Changeset 3393


Ignore:
Timestamp:
Oct 29, 2012, 9:37:21 PM (2 years ago)
Author:
quozl
Message:

OLPC ARM - assign "0 0 reg" properties to several devices

when linux names devices, devices without a reg property will
get a globally assigned incrementing suffix, which may change
depending on which devices are configured. if present, linux
will use the reg property to create a stable name for a device.
using "0 0 reg" will result in a linux name like "0.ols"

from Paul Fox <pgf@…>

Location:
cpu/arm/olpc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/cl4/leds.fth

    r3198 r3393  
    55   " ols" device-name 
    66   " olpc,xo-light-sensor" +compatible 
     7   0 0 reg  \ So linux will assign a static device name 
    78end-package 
    89 
  • cpu/arm/olpc/gpio-i2c.fth

    r3261 r3393  
    3535      1 " #address-cells" integer-property 
    3636      1 " #size-cells" integer-property 
     37 
     38      0 0 reg  \ So linux will assign a static device name 
     39 
    3740      : encode-unit  ( phys.. -- str )  push-hex (u.) pop-base  ; 
    3841      : decode-unit  ( str -- phys.. )  push-hex  $number  if  0  then  pop-base  ; 
     
    7780      1 " #address-cells" integer-property 
    7881      1 " #size-cells" integer-property 
     82 
     83      0 0 reg  \ So linux will assign a static device name 
     84 
    7985      : encode-unit  ( phys.. -- str )  push-hex (u.) pop-base  ; 
    8086      : decode-unit  ( str -- phys.. )  push-hex  $number  if  0  then  pop-base  ; 
  • cpu/arm/olpc/sound.fth

    r3356 r3393  
    759759   \ The name that was hardcoded in the Linux driver was OLPC XO-1.75 
    760760   " OLPC XO" " model" string-property 
     761 
     762   0 0 reg  \ So linux will assign a static device name 
    761763 
    762764   : +string  encode-string encode+  ; 
Note: See TracChangeset for help on using the changeset viewer.