[openfirmware] [commit] r1796 - dev/olpc/viacamera

repository service svn at openfirmware.info
Thu Apr 29 22:28:24 CEST 2010


Author: wmb
Date: Thu Apr 29 22:28:24 2010
New Revision: 1796
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1796

Log:
OLPC trac 10138 - added "reg" property to /camera node so test-all will test the camera.

Modified:
   dev/olpc/viacamera/loadpkg.fth

Modified: dev/olpc/viacamera/loadpkg.fth
==============================================================================
--- dev/olpc/viacamera/loadpkg.fth	Thu Apr 29 20:24:29 2010	(r1795)
+++ dev/olpc/viacamera/loadpkg.fth	Thu Apr 29 22:28:24 2010	(r1796)
@@ -13,8 +13,19 @@
 : dma-alloc  ( len -- adr )  " dma-alloc" $call-parent  ;
 : dma-free  ( adr len -- )  " dma-free" $call-parent  ;
 
+\ encode-unit, decode-unit, #size-cells and #address-cells establish the
+\ characteristics of a  subordinate address space so the camera sub-node
+\ can have a reg property.
+: encode-unit  ( n -- adr len )  push-hex (u.) pop-base  ;
+: decode-unit  ( adr len -- n )
+   push-hex  $number  if  0  then  pop-base
+;
+1 " #size-cells" integer-property
+1 " #address-cells" integer-property
+
 new-device
    " camera" device-name
+   0 0 reg  \ A reg property makes "test-all" consider this device
    fload ${BP}/dev/olpc/viacamera/smbus.fth
    fload ${BP}/dev/olpc/viacamera/camera.fth
 finish-device



More information about the openfirmware mailing list