[PATCH] lite5200b: flash definition in dts

Grant Likely grant.likely at secretlab.ca
Thu Aug 2 16:23:31 EST 2007


On 8/1/07, Domen Puncer <domen.puncer at telargo.com> wrote:
> On 01/08/07 06:41 -0600, Grant Likely wrote:
> > On 8/1/07, Domen Puncer <domen.puncer at telargo.com> wrote:
> > > Add flash definition for to lite5200b dts, and while at it
> > > fix "ranges" for soc node.
> > >
> ...
> > > +++ work-powerpc.git/arch/powerpc/boot/dts/lite5200b.dts
> > > @@ -52,7 +52,8 @@
> > >                 revision = "";                  // from bootloader
> > >                 #interrupt-cells = <3>;
> > >                 device_type = "soc";
> > > -               ranges = <0 f0000000 f0010000>;
> > > +               ranges = <00000000 f0000000 00010000
> > > +                         fe000000 fe000000 02000000>;
> >
> > I don't think this is the right approach.  I think the SoC node is
> > intended for describing the on-chip devices, and the ranges property
> > reflects that.  Shouldn't flash nodes be up 1 level?
> >
>
> That would make sense, however, it does not work, probably because:
> arch/powerpc/kernel/of_platform.c:
> <snip>
>
> Suggestions?

This is fixable in many ways.  I don't know if there is an established
convention yet, but it's just a matter of making sure the platform
setup code adds the devices to the of_platform_bus.  Freescale folks,
what say you?

> BTW. phy's are also not on chip, but are usualy listed under "soc"
> (ie. mpc885ads.dts). Or rtc chip connected to i2c in kuroboxHD.dts.

Phy's are also directly connected to MDIO busses and rtc chips
directly connected to i2c busses.  Both the MDIO and i2c controllers
are mapped entirely within the MBAR region which matches the soc node
range.  Flash seems different to me because it is mapped outside the
shared region...

On the other hand there is PCI whose control registers fall within the
SoC range; but the memory windows absolutely do not.  If my flash
argument holds water, then where does that leave PCI which kind of
straddles the fence.  Gah.  Perhaps I'm getting too wrapped up in
nothing.  Having the flash node as a child of "soc" still describes
the platform in an unambiguous way.

Cheers,
g.

>
>
>         Domen
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195


More information about the Linuxppc-embedded mailing list