Changeset 3190


Ignore:
Timestamp:
Aug 17, 2012, 7:19:25 PM (20 months ago)
Author:
wmb
Message:

OLPC ARM - Added #address-cells, #size-cells, encode-unit, and decode-unit methods to i2c-gpio device nodes so they can have children with reg properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/mmp2/gpio.fth

    r3187 r3190  
    9797      " camera-i2c" device-name 
    9898      " i2c-gpio" +compatible 
     99      1 " #address-cells" integer-property 
     100      1 " #size-cells" integer-property 
     101      : encode-unit  ( phys.. -- str )  push-hex (u.) pop-base  ; 
     102      : decode-unit  ( str -- phys.. )  push-hex  $number  if  0  then  pop-base  ; 
     103      : open  ( -- flag )  true  ; 
     104      : close  ( -- )  ; 
     105       
    99106     
    100107      0 0 encode-bytes 
     
    107114      " dcon-i2c" device-name 
    108115      " i2c-gpio" +compatible 
     116      1 " #address-cells" integer-property 
     117      1 " #size-cells" integer-property 
     118      : encode-unit  ( phys.. -- str )  push-hex (u.) pop-base  ; 
     119      : decode-unit  ( str -- phys.. )  push-hex  $number  if  0  then  pop-base  ; 
     120      : open  ( -- flag )  true  ; 
     121      : close  ( -- )  ; 
    109122 
    110123      0 0 encode-bytes 
Note: See TracChangeset for help on using the changeset viewer.