[PATCH] ARM: pci: pass a parent to pci_common_init()

Andrew Murray andrew.murray at arm.com
Fri Apr 12 09:48:11 EDT 2013


On Fri, Apr 12, 2013 at 02:01:48PM +0100, Arnd Bergmann wrote:
> On Friday 12 April 2013, Andrew Murray wrote:
> > I would also be happy with this. Though alternatively could you
> > not just add a struct device to hw_pci? Then change pcibios_init_hw
> > to use hw->device instead of NULL?
> > 
> 
> I think struct hw_pci is meant to be statically defined, so that would
> not work if you need the same hw_pci for two host bridge devices.
> 
> 	Arnd
> 

Yes, though the new PCIe host/bridge drivers with DT support all seem to call
pci_common_init at probe with a non-statically defined hw_pci with the
nr_controllers always set to 1 (meaning that pci_common_init can be called
multiple times). Also hw_pci now has a field for private_data anyway which
breaks this assumption...

Is there an argument for removing hw_pci or at least .nr_controllers and call
pci_common_init multiple times (as is potential current use case for DT PCI
drivers)?

Andrew Murray



More information about the linux-arm-kernel mailing list