Subject: Re: [PATCH] lite5200b: flash definition in dts

From: Domen Puncer <[email-masked]>
Date: Thu, 2 Aug 2007 07:58:30 +0200

On 01/08/07 06:41 -0600, Grant Likely wrote:
> On 8/1/07, Domen Puncer <[email-masked]> 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:

 32 /*
 33  * The list of OF IDs below is used for matching bus types in the
 34  * system whose devices are to be exposed as of_platform_devices.
 35  *
 36  * This is the default list valid for most platforms. This file provides
 37  * functions who can take an explicit list if necessary though
 38  *
 39  * The search is always performed recursively looking for children of
 40  * the provided device_node and recursively if such a children matches
 41  * a bus type in the list
 42  */
 43 
 44 static struct of_device_id of_default_bus_ids[] = {
 45         { .type = "soc", },
 46         { .compatible = "soc", },
 47         { .type = "spider", },
 48         { .type = "axon", },
 49         { .type = "plb5", },
 50         { .type = "plb4", },
 51         { .type = "opb", },
 52         { .type = "ebc", },
 53         {},
 54 };

Suggestions?
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.

	Domen