Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-21 Thread Stephen Rothwell
Hi Grant, On Fri, 21 Aug 2009 08:54:25 -0600 Grant Likely wrote: > > On Fri, Aug 21, 2009 at 12:01 AM, Stephen Rothwell > wrote: > > > > And similarly with sparc's pci_parse_of_addrs() and pci_parse_of_flags > > () ?  Maybe create drivers/of/pci.c (or drivers/pci/of.c)?  Or maybe they > > are s

Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-21 Thread Grant Likely
On Fri, Aug 21, 2009 at 12:05 AM, Benjamin Herrenschmidt wrote: > On Thu, 2009-08-20 at 23:30 -0600, Grant Likely wrote: >> From: Grant Likely >> >> The PCI device tree scanning code in pci_64.c is some useful functionality. >> It allows PCI devices to be described in the device tree instead of be

Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-21 Thread Grant Likely
On Fri, Aug 21, 2009 at 12:01 AM, Stephen Rothwell wrote: > > And similarly with sparc's pci_parse_of_addrs() and pci_parse_of_flags > () ?  Maybe create drivers/of/pci.c (or drivers/pci/of.c)?  Or maybe they > are still too different? > > There is probably scope for more consolidation there. I ag

Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-20 Thread Benjamin Herrenschmidt
On Thu, 2009-08-20 at 23:30 -0600, Grant Likely wrote: > From: Grant Likely > > The PCI device tree scanning code in pci_64.c is some useful functionality. > It allows PCI devices to be described in the device tree instead of being > probed for, which in turn allows pci devices to use all of the

Re: [PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-20 Thread Stephen Rothwell
Hi Grant, On Thu, 20 Aug 2009 23:30:17 -0600 Grant Likely wrote: > > +/** > + * get_int_prop - Decode a u32 from a device tree property > + */ > +static u32 get_int_prop(struct device_node *np, const char *name, u32 def) > +{ > + const u32 *prop; > + int len; > + > + prop = of_get_pr

[PATCH 2/3] powerpc/pci: move pci_64.c device tree scanning code into pci-common.c

2009-08-20 Thread Grant Likely
From: Grant Likely The PCI device tree scanning code in pci_64.c is some useful functionality. It allows PCI devices to be described in the device tree instead of being probed for, which in turn allows pci devices to use all of the device tree facilities to describe complex PCI bus architectures