[PATCH openfirmware v2] Add more info to device tree

Mitch Bradley wmb at laptop.org
Mon Feb 28 12:39:01 EST 2011


Patch applied to svn head.

Note that it might be prudent to do the patch in olpc.fth instead of 
going through a release/test cycle for XO-1 OFW.


On 2/28/2011 7:09 AM, Daniel Drake wrote:
> In Linux we plan to use the device tree for probing the DCON, battery, and
> XO-1 RTC drivers.
>
> Add the required information using the naming scheme suggested by
> Grant Likely.
>
> The dcon node and battery's compatible property apply for both XO-1 and
> XO-1.5. The RTC's compatible property is only added for XO-1, in order
> to trigger the XO-1-specific RTC wakeup driver.
>
> Index: cpu/x86/pc/olpc/devices.fth
> ===================================================================
> --- cpu/x86/pc/olpc/devices.fth	(revisión: 2174)
> +++ cpu/x86/pc/olpc/devices.fth	(copia de trabajo)
> @@ -152,6 +152,12 @@
>      " /rtc" open-dev  clock-node !
>   ;
>
> +\ Linux identifies XO-1 RTC with EC-based wakeup capabilities through this
> +\ device property.
> +dev /rtc
> +" olpc,xo1-rtc" +compatible
> +dend
> +
>   fload ${BP}/cpu/x86/pc/cpunode.fth
>   fload ${BP}/cpu/x86/k6cputest.fth	\ Burnin test for K6 CPU
>
> Index: dev/olpc/dcon/dcon.fth
> ===================================================================
> --- dev/olpc/dcon/dcon.fth	(revisión: 2174)
> +++ dev/olpc/dcon/dcon.fth	(copia de trabajo)
> @@ -1,6 +1,10 @@
>   \ See license at end of file
> -\ " dcon" device-name
>
> +new-device
> +" dcon" device-name
> +" olpc,xo1-dcon" +compatible
> +finish-device
> +
>   \ DCON internal registers, accessed via I2C
>   \ 0 constant DCON_ID
>   \ 1 constant DCON_MODE
> Index: dev/olpc/dcon/viadcon.fth
> ===================================================================
> --- dev/olpc/dcon/viadcon.fth	(revisión: 2174)
> +++ dev/olpc/dcon/viadcon.fth	(copia de trabajo)
> @@ -1,6 +1,10 @@
>   \ See license at end of file
> -\ " dcon" device-name
>
> +new-device
> +" dcon" device-name
> +" olpc,xo1-dcon" +compatible
> +finish-device
> +
>   \ DCON internal registers, accessed via I2C
>   \ 0 constant DCON_ID
>   \ 1 constant DCON_MODE
> Index: dev/olpc/kb3700/batstat.fth
> ===================================================================
> --- dev/olpc/kb3700/batstat.fth	(revisión: 2174)
> +++ dev/olpc/kb3700/batstat.fth	(copia de trabajo)
> @@ -145,6 +145,8 @@
>   dev /
>   new-device
>   " battery" device-name
> +" olpc,xo1-battery" +compatible
> +
>   0 0 reg  \ Needed so test-all will run the selftest
>
>   \ Test that the battery is inserted and not broken.



More information about the Devel mailing list