diff options
Diffstat (limited to 'arch/powerpc/include/asm/pci-bridge.h')
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index b9732fcb0f5f..278f48978bad 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -12,6 +12,11 @@ | |||
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <asm-generic/pci-bridge.h> | 13 | #include <asm-generic/pci-bridge.h> |
14 | 14 | ||
15 | /* Return values for pci_controller_ops.probe_mode function */ | ||
16 | #define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ | ||
17 | #define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ | ||
18 | #define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ | ||
19 | |||
15 | struct device_node; | 20 | struct device_node; |
16 | 21 | ||
17 | /* | 22 | /* |
@@ -20,6 +25,8 @@ struct device_node; | |||
20 | struct pci_controller_ops { | 25 | struct pci_controller_ops { |
21 | void (*dma_dev_setup)(struct pci_dev *dev); | 26 | void (*dma_dev_setup)(struct pci_dev *dev); |
22 | void (*dma_bus_setup)(struct pci_bus *bus); | 27 | void (*dma_bus_setup)(struct pci_bus *bus); |
28 | |||
29 | int (*probe_mode)(struct pci_bus *); | ||
23 | }; | 30 | }; |
24 | 31 | ||
25 | /* | 32 | /* |
@@ -292,5 +299,16 @@ static inline void pci_dma_bus_setup(struct pci_bus *bus) | |||
292 | ppc_md.pci_dma_bus_setup(bus); | 299 | ppc_md.pci_dma_bus_setup(bus); |
293 | } | 300 | } |
294 | 301 | ||
302 | static inline int pci_probe_mode(struct pci_bus *bus) | ||
303 | { | ||
304 | struct pci_controller *phb = pci_bus_to_host(bus); | ||
305 | |||
306 | if (phb->controller_ops.probe_mode) | ||
307 | return phb->controller_ops.probe_mode(bus); | ||
308 | if (ppc_md.pci_probe_mode) | ||
309 | return ppc_md.pci_probe_mode(bus); | ||
310 | return PCI_PROBE_NORMAL; | ||
311 | } | ||
312 | |||
295 | #endif /* __KERNEL__ */ | 313 | #endif /* __KERNEL__ */ |
296 | #endif /* _ASM_POWERPC_PCI_BRIDGE_H */ | 314 | #endif /* _ASM_POWERPC_PCI_BRIDGE_H */ |