aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/pci-bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/pci-bridge.h')
-rw-r--r--include/asm-powerpc/pci-bridge.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 223ec7bd81da..1a08860e789e 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -1,5 +1,6 @@
1#ifndef _ASM_POWERPC_PCI_BRIDGE_H 1#ifndef _ASM_POWERPC_PCI_BRIDGE_H
2#define _ASM_POWERPC_PCI_BRIDGE_H 2#define _ASM_POWERPC_PCI_BRIDGE_H
3#ifdef __KERNEL__
3 4
4#ifndef CONFIG_PPC64 5#ifndef CONFIG_PPC64
5#include <asm-ppc/pci-bridge.h> 6#include <asm-ppc/pci-bridge.h>
@@ -125,9 +126,19 @@ static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
125 return bus->sysdata; /* Must be root bus (PHB) */ 126 return bus->sysdata; /* Must be root bus (PHB) */
126} 127}
127 128
129/** Find the bus corresponding to the indicated device node */
130struct pci_bus * pcibios_find_pci_bus(struct device_node *dn);
131
128extern void pci_process_bridge_OF_ranges(struct pci_controller *hose, 132extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,
129 struct device_node *dev, int primary); 133 struct device_node *dev, int primary);
130 134
135/** Remove all of the PCI devices under this bus */
136void pcibios_remove_pci_devices(struct pci_bus *bus);
137
138/** Discover new pci devices under this bus, and add them */
139void pcibios_add_pci_devices(struct pci_bus * bus);
140void pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus);
141
131extern int pcibios_remove_root_bus(struct pci_controller *phb); 142extern int pcibios_remove_root_bus(struct pci_controller *phb);
132 143
133extern void phbs_remap_io(void); 144extern void phbs_remap_io(void);
@@ -140,14 +151,27 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus)
140 return PCI_DN(busdn)->phb; 151 return PCI_DN(busdn)->phb;
141} 152}
142 153
154extern struct pci_controller*
155pci_find_hose_for_OF_device(struct device_node* node);
156
143extern struct pci_controller * 157extern struct pci_controller *
144pcibios_alloc_controller(struct device_node *dev); 158pcibios_alloc_controller(struct device_node *dev);
145extern void pcibios_free_controller(struct pci_controller *phb); 159extern void pcibios_free_controller(struct pci_controller *phb);
146 160
161#ifdef CONFIG_PCI
162extern unsigned long pci_address_to_pio(phys_addr_t address);
163#else
164static inline unsigned long pci_address_to_pio(phys_addr_t address)
165{
166 return (unsigned long)-1;
167}
168#endif
169
147/* Return values for ppc_md.pci_probe_mode function */ 170/* Return values for ppc_md.pci_probe_mode function */
148#define PCI_PROBE_NONE -1 /* Don't look at this bus at all */ 171#define PCI_PROBE_NONE -1 /* Don't look at this bus at all */
149#define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */ 172#define PCI_PROBE_NORMAL 0 /* Do normal PCI probing */
150#define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */ 173#define PCI_PROBE_DEVTREE 1 /* Instantiate from device tree */
151 174
152#endif /* CONFIG_PPC64 */ 175#endif /* CONFIG_PPC64 */
176#endif /* __KERNEL__ */
153#endif 177#endif