Author: quozl Date: Wed Sep 26 05:48:31 2012 New Revision: 3326 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3326
Log: OLPC XO-1 XO-1.75 XO-4 - fix broken XO-1 build, avoid core words in FCode camera driver on XO-1, and move image sensor probe into load file for XO-1.75 and XO-4.
Modified: dev/olpc/imagesensor.fth dev/olpc/mmp2camera/loadpkg.fth
Modified: dev/olpc/imagesensor.fth ============================================================================== --- dev/olpc/imagesensor.fth Wed Sep 26 05:44:41 2012 (r3325) +++ dev/olpc/imagesensor.fth Wed Sep 26 05:48:31 2012 (r3326) @@ -12,21 +12,18 @@ : sensor-found? ( -- flag ) false ; + : set-sensor-properties ( name$ i2c-addr -- ) my-self >r 0 to my-self - " /image-sensor" find-device ( name$ i2c-addr ) - " reg" get-property if ( name$ i2c-addr ) - 1 reg ( name$ ) - +compatible ( ) - else ( name$ i2c-addr regval$ ) - 2drop 3drop ( ) - then - device-end + " /image-sensor" find-package if ( name$ i2c-addr phandle ) + " reg" rot get-package-property if ( name$ i2c-addr ) + 1 reg ( name$ ) + encode-string " compatible" property + else ( name$ i2c-addr regval$ ) + 2drop 3drop ( ) + then ( ) + else ( name$ i2c-addr ) + 3drop ( ) + then ( ) r> to my-self ; - -also forth definitions -: probe-image-sensor ( -- ) - " /camera" open-dev close-dev -; -previous definitions
Modified: dev/olpc/mmp2camera/loadpkg.fth ============================================================================== --- dev/olpc/mmp2camera/loadpkg.fth Wed Sep 26 05:44:41 2012 (r3325) +++ dev/olpc/mmp2camera/loadpkg.fth Wed Sep 26 05:48:31 2012 (r3326) @@ -47,3 +47,6 @@ fload ${BP}/dev/olpc/mmp2camera/ccic.fth fload ${BP}/dev/olpc/cameratest.fth end-package +: probe-image-sensor ( -- ) + " /camera" open-dev close-dev +;
openfirmware@openfirmware.info