summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop32x/iq80321-pci.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 23:17:36 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 10:25:41 +0100
commit7e9740b11529a0a69789fbe92d324f293e6266f6 (patch)
tree7ea94f603608744270756b56c668d658174a5b9b /arch/arm/mach-iop32x/iq80321-pci.c
parent0cb015f9dea8a40d82d170be1a4f39ff909890bf (diff)
downloadlinux-7e9740b11529a0a69789fbe92d324f293e6266f6.tar.bz2
[ARM] 3821/1: iop3xx: switch iop32x/iop33x over to shared pci code
Switch the iop32x and iop33x code over to the common PCI implementation, and remove the (nearly identical) iop32x and iop33x PCI implementations. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-iop32x/iq80321-pci.c')
-rw-r--r--arch/arm/mach-iop32x/iq80321-pci.c45
1 files changed, 3 insertions, 42 deletions
diff --git a/arch/arm/mach-iop32x/iq80321-pci.c b/arch/arm/mach-iop32x/iq80321-pci.c
index 8767950e131f..cedc37b968b7 100644
--- a/arch/arm/mach-iop32x/iq80321-pci.c
+++ b/arch/arm/mach-iop32x/iq80321-pci.c
@@ -61,51 +61,12 @@ iq80321_map_irq(struct pci_dev *dev, u8 idsel, u8 pin)
return pci_irq_table[idsel%4][pin-1];
}
-static int iq80321_setup(int nr, struct pci_sys_data *sys)
-{
- struct resource *res;
-
- if(nr != 0)
- return 0;
-
- res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
- if (!res)
- panic("PCI: unable to alloc resources");
-
- res[0].start = IOP321_PCI_LOWER_IO_VA;
- res[0].end = IOP321_PCI_UPPER_IO_VA;
- res[0].name = "IQ80321 PCI I/O Space";
- res[0].flags = IORESOURCE_IO;
-
- res[1].start = IOP321_PCI_LOWER_MEM_PA;
- res[1].end = IOP321_PCI_UPPER_MEM_PA;
- res[1].name = "IQ80321 PCI Memory Space";
- res[1].flags = IORESOURCE_MEM;
-
- request_resource(&ioport_resource, &res[0]);
- request_resource(&iomem_resource, &res[1]);
-
- sys->mem_offset = IOP321_PCI_MEM_OFFSET;
- sys->io_offset = IOP321_PCI_IO_OFFSET;
-
- sys->resource[0] = &res[0];
- sys->resource[1] = &res[1];
- sys->resource[2] = NULL;
-
- return 1;
-}
-
-static void iq80321_preinit(void)
-{
- iop321_init();
-}
-
static struct hw_pci iq80321_pci __initdata = {
.swizzle = pci_std_swizzle,
.nr_controllers = 1,
- .setup = iq80321_setup,
- .scan = iop321_scan_bus,
- .preinit = iq80321_preinit,
+ .setup = iop3xx_pci_setup,
+ .scan = iop3xx_pci_scan_bus,
+ .preinit = iop3xx_pci_preinit,
.map_irq = iq80321_map_irq
};