Author: quozl Date: Thu Sep 27 02:23:30 2012 New Revision: 3332 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3332
Log: OLPC XO-1.75 XO-4 - image sensor properties were applied to camera, move them to the image sensor node, related r3330 and r3326.
Modified: dev/olpc/imagesensor.fth dev/olpc/mmp2camera/loadpkg.fth
Modified: dev/olpc/imagesensor.fth ============================================================================== --- dev/olpc/imagesensor.fth Thu Sep 27 02:04:29 2012 (r3331) +++ dev/olpc/imagesensor.fth Thu Sep 27 02:23:30 2012 (r3332) @@ -12,16 +12,3 @@ : sensor-found? ( -- flag ) false ; - -: set-sensor-properties ( name$ i2c-addr -- ) - " /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 ( ) -;
Modified: dev/olpc/mmp2camera/loadpkg.fth ============================================================================== --- dev/olpc/mmp2camera/loadpkg.fth Thu Sep 27 02:04:29 2012 (r3331) +++ dev/olpc/mmp2camera/loadpkg.fth Thu Sep 27 02:23:30 2012 (r3332) @@ -40,6 +40,20 @@
fload ${BP}/dev/olpc/mmp2camera/platform.fth fload ${BP}/dev/olpc/imagesensor.fth + + : 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 + r> to my-self + ; + warning @ warning off fload ${BP}/dev/olpc/ov7670.fth fload ${BP}/dev/olpc/seti.fth \ Load last; most likely to be present