How to use Localbus on 5200B w/ 2.6.29.1

Grant Likely grant.likely at secretlab.ca
Tue Apr 28 03:36:58 EST 2009


On Mon, Apr 27, 2009 at 11:18 AM, Albrecht Dreß <albrecht.dress at arcor.de> wrote:
> Hi all,
>
> I have a question about the definition of the localbus on the Freescale
> 5200B (I'm testing with the Lite5200B board) with Kernel 2.6.29.1 which I
> could not figure out with the docs and the list archives...
>
> When I use 'compatible = "fsl,mpc5200b-lpb";' in the dts file, the localbus
> and any nodes below it don't show up in /sys/devices.

For completeness use: compatible =
"fsl,mpc5200b-lpb","fsl,mpc5200-lpb","simple-bus";  Then it will work.

The kernel doesn't currently bind on the 'b' string, but we put it in
the list anyway to completely describe the hardware, just in case it
ever becomes important in the future.


[...]
>        mydev at 3,0 {
>                compatible = "mydev";

"mydev" should be in the form: "<vendor>,<device>".

>                reg = <0 0x0 0x100>;            // 256 Bytes, 32 used

If this is on CS3, then reg should be:
               reg = <3 0x0 0x100>;            // 256 Bytes, 32 used

>                interrupts = <1 3 2>;           // todo - level?
>                interrupt-parent = <&mpc5200_pic>;
>        };
> };
> # ls -al /sys/devices/f0000300.localbus/
> drwxr-xr-x    4 0        0               0 Jan  1 00:00 .
> drwxr-xr-x    7 0        0               0 Jan  1 00:00 ..
> -r--r--r--    1 0        0            4096 Jan  1 00:00 devspec
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 fc000000.flash
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 fc000000.mydev
> -r--r--r--    1 0        0            4096 Jan  1 00:00 modalias
> -r--r--r--    1 0        0            4096 Jan  1 00:00 name
> lrwxrwxrwx    1 0        0               0 Jan  1 00:00 subsystem ->
> ../../bus/of_platform
> -rw-r--r--    1 0        0            4096 Jan  1 00:00 uevent
> </snip>
>
> which is also confusing, as both devices appear to have the same address?
>  Any idea what goes wrong here?

Because the reg property for mydev is wrong (see above).

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the Linuxppc-dev mailing list