aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/pci.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-27 15:48:37 -0400
committerPaul Mackerras <paulus@samba.org>2008-11-05 17:22:37 -0500
commit8b8da35804bb89eee23f9bcd5638e1f754bd4c91 (patch)
tree8ec1ba6ef03c88da5c37eec4825fff6524358b37 /arch/powerpc/include/asm/pci.h
parentab56ced9c57b66862c687f3158045d15133f02d6 (diff)
powerpc/pci: Split pcibios_fixup_bus() into bus setup and device setup
Currently, our PCI code uses the pcibios_fixup_bus() callback, which is called by the generic code when probing PCI buses, for two different things. One is to set up things related to the bus itself, such as reading bridge resources for P2P bridges, fixing them up, or setting up the iommu's associated with bridges on some platforms. The other is some setup for each individual device under that bridge, mostly setting up DMA mappings and interrupts. The problem is that this approach doesn't work well with PCI hotplug when an existing bus is re-probed for new children. We fix this problem by splitting pcibios_fixup_bus into two routines: pcibios_setup_bus_self() is now called to setup the bus itself pcibios_setup_bus_devices() is now called to setup devices pcibios_fixup_bus() is then modified to call these two after reading the bridge bases, and the OF based PCI probe is modified to avoid calling into the first one when rescanning an existing bridge. [paulus@samba.org - fixed eeh.h for 32-bit compile now that pci-common.c is including it unconditionally.] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/include/asm/pci.h')
-rw-r--r--arch/powerpc/include/asm/pci.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/pci.h b/arch/powerpc/include/asm/pci.h
index 55542ac3eadb..32e03e6d25c5 100644
--- a/arch/powerpc/include/asm/pci.h
+++ b/arch/powerpc/include/asm/pci.h
@@ -221,6 +221,7 @@ extern void of_scan_pci_bridge(struct device_node *node,
221 struct pci_dev *dev); 221 struct pci_dev *dev);
222 222
223extern void of_scan_bus(struct device_node *node, struct pci_bus *bus); 223extern void of_scan_bus(struct device_node *node, struct pci_bus *bus);
224extern void of_rescan_bus(struct device_node *node, struct pci_bus *bus);
224 225
225extern int pci_read_irq_line(struct pci_dev *dev); 226extern int pci_read_irq_line(struct pci_dev *dev);
226 227
@@ -235,8 +236,8 @@ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
235 const struct resource *rsrc, 236 const struct resource *rsrc,
236 resource_size_t *start, resource_size_t *end); 237 resource_size_t *start, resource_size_t *end);
237 238
238extern void pcibios_fixup_of_probed_bus(struct pci_bus *bus); 239extern void pcibios_setup_bus_devices(struct pci_bus *bus);
239 240extern void pcibios_setup_bus_self(struct pci_bus *bus);
240 241
241#endif /* __KERNEL__ */ 242#endif /* __KERNEL__ */
242#endif /* __ASM_POWERPC_PCI_H */ 243#endif /* __ASM_POWERPC_PCI_H */