diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-05-20 08:41:25 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-06-21 07:30:51 +0200 |
commit | d366d28cd1325f11d582ec6d4a14b8329d3e1a20 (patch) | |
tree | 294190afc61c7a8ab26c1a7e2b02fb311397261e /drivers/pci/setup-bus.c | |
parent | powerpc: export cpu_to_core_id() (diff) | |
download | linux-d366d28cd1325f11d582ec6d4a14b8329d3e1a20.tar.xz linux-d366d28cd1325f11d582ec6d4a14b8329d3e1a20.zip |
PCI: Add pcibios_setup_bridge()
Currently, PowerPC PowerNV platform utilizes ppc_md.pcibios_fixup(),
which is called for once after PCI probing and resource assignment
are completed, to allocate platform required resources for PCI devices:
PE#, IO and MMIO mapping, DMA address translation (TCE) table etc.
Obviously, it's not hotplug friendly.
This adds weak function pcibios_setup_bridge(), which is called by
pci_setup_bridge(). PowerPC PowerNV platform will reuse the function
to assign above platform required resources to newly plugged PCI devices
during PCI hotplug in subsequent patches.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 55641a39a3e9..d678c46e5f03 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -695,11 +695,16 @@ static void __pci_setup_bridge(struct pci_bus *bus, unsigned long type) pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl); } +void __weak pcibios_setup_bridge(struct pci_bus *bus, unsigned long type) +{ +} + void pci_setup_bridge(struct pci_bus *bus) { unsigned long type = IORESOURCE_IO | IORESOURCE_MEM | IORESOURCE_PREFETCH; + pcibios_setup_bridge(bus, type); __pci_setup_bridge(bus, type); } |