summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_32.c
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2009-01-08 02:19:46 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-02-11 16:00:07 +1100
commitc3bd517de67d33c44059656194e316facef181a5 (patch)
tree8b61341ac8aec4d18499ce7a99d545b2912abb9a /arch/powerpc/kernel/pci_32.c
parent6071ed0487c6ea8dcfadd9844b9b90944cd9de1e (diff)
downloadop-kernel-dev-c3bd517de67d33c44059656194e316facef181a5.zip
op-kernel-dev-c3bd517de67d33c44059656194e316facef181a5.tar.gz
powerpc/pci: Move hose_list and pci_address_to_pio to pci-common
move the definition of hose_list next to its hotplug spinlock. create pcibios_io_size to encapsulate ifdef in existing pci-common function pcibios_vaddr_is_ioport move pci_address_to_pio to pci-common, using new pcibios_io_size, and protect this GPL exported function against concurrent hotplug removal Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
-rw-r--r--arch/powerpc/kernel/pci_32.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 132cd80..c636850 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -20,6 +20,7 @@
#include <asm/prom.h>
#include <asm/sections.h>
#include <asm/pci-bridge.h>
+#include <asm/ppc-pci.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
@@ -43,8 +44,6 @@ static u8* pci_to_OF_bus_map;
*/
static int pci_assign_all_buses;
-LIST_HEAD(hose_list);
-
static int pci_bus_count;
/* This will remain NULL for now, until isa-bridge.c is made common
@@ -491,24 +490,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
return result;
}
-unsigned long pci_address_to_pio(phys_addr_t address)
-{
- struct pci_controller *hose, *tmp;
-
- list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
- unsigned int size = hose->io_resource.end -
- hose->io_resource.start + 1;
- if (address >= hose->io_base_phys &&
- address < (hose->io_base_phys + size)) {
- unsigned long base =
- (unsigned long)hose->io_base_virt - _IO_BASE;
- return base + (address - hose->io_base_phys);
- }
- }
- return (unsigned int)-1;
-}
-EXPORT_SYMBOL(pci_address_to_pio);
-
/*
* Null PCI config access functions, for the case when we can't
* find a hose.
OpenPOWER on IntegriCloud