On Fri, Jul 16, 2010 at 12:34 PM, Stephen Neuendorffer <[email protected]> wrote: > > >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] On Behalf Of Grant >> Likely >> Sent: Friday, July 16, 2010 11:32 AM >> To: Stephen Neuendorffer >> Cc: [email protected] >> 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 >> <[email protected]> wrote: >> > Signed-off-by: Stephen Neuendorffer <[email protected]> >> > >> > --- >> > >> > 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. _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
