aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-12-06 21:01:05 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:52:07 -0500
commitd4e4b3520c4df46cf1d15a56379a6fa57e267b7d (patch)
tree653d5a87d58e37b6bf44b5a06eaffb8d62735065 /arch/powerpc/kernel/pci_64.c
parente07102db63d10d9f9d94d21dfdb1178e65154b9e (diff)
[PATCH] powerpc: fix for "Update OF address parsers"
This allows iSeries to build again. It just moves pci_address_to_pio outside the #ifdef CONFIG_PPC_MULTIPLATFORM. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 0988222741f0..4eb93fc1eef2 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -1181,20 +1181,6 @@ void phbs_remap_io(void)
1181 remap_bus_range(hose->bus); 1181 remap_bus_range(hose->bus);
1182} 1182}
1183 1183
1184unsigned int pci_address_to_pio(phys_addr_t address)
1185{
1186 struct pci_controller *hose, *tmp;
1187
1188 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1189 if (address >= hose->io_base_phys &&
1190 address < (hose->io_base_phys + hose->pci_io_size))
1191 return (unsigned int)hose->io_base_virt +
1192 (address - hose->io_base_phys);
1193 }
1194 return (unsigned int)-1;
1195}
1196EXPORT_SYMBOL_GPL(pci_address_to_pio);
1197
1198static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev) 1184static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
1199{ 1185{
1200 struct pci_controller *hose = pci_bus_to_host(dev->bus); 1186 struct pci_controller *hose = pci_bus_to_host(dev->bus);
@@ -1337,6 +1323,20 @@ struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
1337 1323
1338#endif /* CONFIG_PPC_MULTIPLATFORM */ 1324#endif /* CONFIG_PPC_MULTIPLATFORM */
1339 1325
1326unsigned int pci_address_to_pio(phys_addr_t address)
1327{
1328 struct pci_controller *hose, *tmp;
1329
1330 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1331 if (address >= hose->io_base_phys &&
1332 address < (hose->io_base_phys + hose->pci_io_size))
1333 return (unsigned int)hose->io_base_virt +
1334 (address - hose->io_base_phys);
1335 }
1336 return (unsigned int)-1;
1337}
1338EXPORT_SYMBOL_GPL(pci_address_to_pio);
1339
1340 1340
1341#define IOBASE_BRIDGE_NUMBER 0 1341#define IOBASE_BRIDGE_NUMBER 0
1342#define IOBASE_MEMORY 1 1342#define IOBASE_MEMORY 1