summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/pci-bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/pci-bridge.h')
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h18
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 @@
#include <linux/ioport.h>
#include <asm-generic/pci-bridge.h>
+/* Return values for pci_controller_ops.probe_mode function */
+#define PCI_PROBE_NONE -1 /* Don't look at this bus at all */
+#define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */
+#define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */
+
struct device_node;
/*
@@ -20,6 +25,8 @@ struct device_node;
struct pci_controller_ops {
void (*dma_dev_setup)(struct pci_dev *dev);
void (*dma_bus_setup)(struct pci_bus *bus);
+
+ int (*probe_mode)(struct pci_bus *);
};
/*
@@ -292,5 +299,16 @@ static inline void pci_dma_bus_setup(struct pci_bus *bus)
ppc_md.pci_dma_bus_setup(bus);
}
+static inline int pci_probe_mode(struct pci_bus *bus)
+{
+ struct pci_controller *phb = pci_bus_to_host(bus);
+
+ if (phb->controller_ops.probe_mode)
+ return phb->controller_ops.probe_mode(bus);
+ if (ppc_md.pci_probe_mode)
+ return ppc_md.pci_probe_mode(bus);
+ return PCI_PROBE_NORMAL;
+}
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_PCI_BRIDGE_H */