aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-iop33x/iq80332-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-iop33x/iq80332-pci.c')
-rw-r--r--arch/arm/mach-iop33x/iq80332-pci.c45
1 files changed, 3 insertions, 42 deletions
diff --git a/arch/arm/mach-iop33x/iq80332-pci.c b/arch/arm/mach-iop33x/iq80332-pci.c
index f3010f85b1a..0de8aa748dd 100644
--- a/arch/arm/mach-iop33x/iq80332-pci.c
+++ b/arch/arm/mach-iop33x/iq80332-pci.c
@@ -63,51 +63,12 @@ iq80332_map_irq(struct pci_dev *dev, u8 idsel, u8 pin)
return PCI_IRQ_TABLE_LOOKUP(1, 7);
}
-static int iq80332_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 = IOP331_PCI_LOWER_IO_VA;
- res[0].end = IOP331_PCI_UPPER_IO_VA;
- res[0].name = "IQ80332 PCI I/O Space";
- res[0].flags = IORESOURCE_IO;
-
- res[1].start = IOP331_PCI_LOWER_MEM_PA;
- res[1].end = IOP331_PCI_UPPER_MEM_PA;
- res[1].name = "IQ80332 PCI Memory Space";
- res[1].flags = IORESOURCE_MEM;
-
- request_resource(&ioport_resource, &res[0]);
- request_resource(&iomem_resource, &res[1]);
-
- sys->mem_offset = IOP331_PCI_MEM_OFFSET;
- sys->io_offset = IOP331_PCI_IO_OFFSET;
-
- sys->resource[0] = &res[0];
- sys->resource[1] = &res[1];
- sys->resource[2] = NULL;
-
- return 1;
-}
-
-static void iq80332_preinit(void)
-{
- iop331_init();
-}
-
static struct hw_pci iq80332_pci __initdata = {
.swizzle = pci_std_swizzle,
.nr_controllers = 1,
- .setup = iq80332_setup,
- .scan = iop331_scan_bus,
- .preinit = iq80332_preinit,
+ .setup = iop3xx_pci_setup,
+ .scan = iop3xx_pci_scan_bus,
+ .preinit = iop3xx_pci_preinit,
.map_irq = iq80332_map_irq
};