diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-09-18 18:17:36 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-25 05:25:41 -0400 |
commit | 7e9740b11529a0a69789fbe92d324f293e6266f6 (patch) | |
tree | 7ea94f603608744270756b56c668d658174a5b9b /arch/arm/mach-iop33x/iq80331-pci.c | |
parent | 0cb015f9dea8a40d82d170be1a4f39ff909890bf (diff) |
[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-iop33x/iq80331-pci.c')
-rw-r--r-- | arch/arm/mach-iop33x/iq80331-pci.c | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/arch/arm/mach-iop33x/iq80331-pci.c b/arch/arm/mach-iop33x/iq80331-pci.c index 71adb12a9421..8b0bed5e2f91 100644 --- a/arch/arm/mach-iop33x/iq80331-pci.c +++ b/arch/arm/mach-iop33x/iq80331-pci.c | |||
@@ -57,51 +57,12 @@ iq80331_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | |||
57 | return PCI_IRQ_TABLE_LOOKUP(1, 7); | 57 | return PCI_IRQ_TABLE_LOOKUP(1, 7); |
58 | } | 58 | } |
59 | 59 | ||
60 | static int iq80331_setup(int nr, struct pci_sys_data *sys) | ||
61 | { | ||
62 | struct resource *res; | ||
63 | |||
64 | if(nr != 0) | ||
65 | return 0; | ||
66 | |||
67 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); | ||
68 | if (!res) | ||
69 | panic("PCI: unable to alloc resources"); | ||
70 | |||
71 | res[0].start = IOP331_PCI_LOWER_IO_VA; | ||
72 | res[0].end = IOP331_PCI_UPPER_IO_VA; | ||
73 | res[0].name = "IQ80331 PCI I/O Space"; | ||
74 | res[0].flags = IORESOURCE_IO; | ||
75 | |||
76 | res[1].start = IOP331_PCI_LOWER_MEM_PA; | ||
77 | res[1].end = IOP331_PCI_UPPER_MEM_PA; | ||
78 | res[1].name = "IQ80331 PCI Memory Space"; | ||
79 | res[1].flags = IORESOURCE_MEM; | ||
80 | |||
81 | request_resource(&ioport_resource, &res[0]); | ||
82 | request_resource(&iomem_resource, &res[1]); | ||
83 | |||
84 | sys->mem_offset = IOP331_PCI_MEM_OFFSET; | ||
85 | sys->io_offset = IOP331_PCI_IO_OFFSET; | ||
86 | |||
87 | sys->resource[0] = &res[0]; | ||
88 | sys->resource[1] = &res[1]; | ||
89 | sys->resource[2] = NULL; | ||
90 | |||
91 | return 1; | ||
92 | } | ||
93 | |||
94 | static void iq80331_preinit(void) | ||
95 | { | ||
96 | iop331_init(); | ||
97 | } | ||
98 | |||
99 | static struct hw_pci iq80331_pci __initdata = { | 60 | static struct hw_pci iq80331_pci __initdata = { |
100 | .swizzle = pci_std_swizzle, | 61 | .swizzle = pci_std_swizzle, |
101 | .nr_controllers = 1, | 62 | .nr_controllers = 1, |
102 | .setup = iq80331_setup, | 63 | .setup = iop3xx_pci_setup, |
103 | .scan = iop331_scan_bus, | 64 | .scan = iop3xx_pci_scan_bus, |
104 | .preinit = iq80331_preinit, | 65 | .preinit = iop3xx_pci_preinit, |
105 | .map_irq = iq80331_map_irq | 66 | .map_irq = iq80331_map_irq |
106 | }; | 67 | }; |
107 | 68 | ||