ARM: pci: create pci_common_init_dev()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v4 1/1 ARM: pci: create pci_common_init_dev()
Quoted 28 lines · Linus Walleij
When working with device tree support for PCI on ARM you run into a problem when mapping IRQs from the device tree irqmaps:
doing this the code indrivers/of/of_pci_irq.cwill try to find the OF node on the root bridge and this fails, becausebus->dev.of_nodeis NULL, and that in turn boils down to the fact thatpci_set_bus_of_node()has calledpcibios_get_phb_of_node()fromdrivers/pci/of.cto obtain the OF node of the bridge or its parent and none is set and thus NULL is returned.Fix this by adding an additional parent argument API for registering PCI bridges on the ARM architecture called
pci_common_init_dev(), and pass along this parent topci_scan_root_bus()called frompcibios_init_hw()inbios32.cand voila: the IRQ mappings start working:
the OF node can be retrieved from the parent.Create the old
pci_common_init()as a wrapper around the new call.Cc Mike Rapoport <[email protected]>Cc Russell King <[email protected]>Cc Ralf Baechle <[email protected]>Cc Andrew Murray <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Benjamin Herrenschmitt <[email protected]>Reviewed-by Thierry Reding <[email protected]>Signed-off-by Linus Walleij <[email protected]>
Quoted 5 lines
---
ChangeLogv3->v4:
- Put opening bracket on its own line.
- Use the proper rmk+kernel address for Russells CC.
---