[PATCH 2/8] drivers/of: Make device tree code work on any arch.

Grant Likely grant.likely at secretlab.ca
Sat Jul 17 04:55:22 EST 2010


On Fri, Jul 16, 2010 at 12:34 PM, Stephen Neuendorffer
<stephen.neuendorffer at xilinx.com> wrote:
>
>
>> -----Original Message-----
>> From: glikely at secretlab.ca [mailto:glikely at secretlab.ca] On Behalf Of Grant Likely
>> Sent: Friday, July 16, 2010 11:32 AM
>> To: Stephen Neuendorffer
>> Cc: devicetree-discuss at lists.ozlabs.org
>> Subject: Re: [PATCH 2/8] drivers/of: Make device tree code work on any arch.
>>
>> On Fri, Jul 16, 2010 at 12:13 PM, Stephen Neuendorffer
>> <stephen.neuendorffer at xilinx.com> wrote:
>> > Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
>> >
>> > ---
>> >
>> > I'm not sure what the right way to abstract these functions is.
>> > of_node_to_nid seems specific to those platforms which have a root
>> > device tree.  pci_address_to_pio seems to probably have a useful
>> > implementation, but I'm not sure what it's trying to do.  Perhaps
>> > someone can shed some light?
>>
>> Right now I'm making each arch implement the pci_address_to_pio() and
>> of_node_to_nid() hooks.  Not sure if I'll retain that in the long
>> term.  pci_address_to_pio() will probably become common code
>> eventually.
>
> One thought that I had was to factor those archs/platforms that have a root device tree
> (and probably have a useful of_node_to_nid), from those that don't.  This would also simplify
> some of the #ifdefs in drivers/of/fdt.c which pick out MICROBLAZE, POWERPC and SPARC for
> the early_device_tree stuff.

And what about the platforms that have both root and non-root device
trees?  This includes x86 by the way.  I've received patches to add
OLPC device tree support.  OLPC is currently x86, but the 1.75
hardware will be ARM.  Both run open firmware.

g.


More information about the devicetree-discuss mailing list