diff options
Diffstat (limited to 'arch/arm/mach-iop32x/iq80321-pci.c')
-rw-r--r-- | arch/arm/mach-iop32x/iq80321-pci.c | 45 |
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) | |||
61 | return pci_irq_table[idsel%4][pin-1]; | 61 | return pci_irq_table[idsel%4][pin-1]; |
62 | } | 62 | } |
63 | 63 | ||
64 | static int iq80321_setup(int nr, struct pci_sys_data *sys) | ||
65 | { | ||
66 | struct resource *res; | ||
67 | |||
68 | if(nr != 0) | ||
69 | return 0; | ||
70 | |||
71 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); | ||
72 | if (!res) | ||
73 | panic("PCI: unable to alloc resources"); | ||
74 | |||
75 | res[0].start = IOP321_PCI_LOWER_IO_VA; | ||
76 | res[0].end = IOP321_PCI_UPPER_IO_VA; | ||
77 | res[0].name = "IQ80321 PCI I/O Space"; | ||
78 | res[0].flags = IORESOURCE_IO; | ||
79 | |||
80 | res[1].start = IOP321_PCI_LOWER_MEM_PA; | ||
81 | res[1].end = IOP321_PCI_UPPER_MEM_PA; | ||
82 | res[1].name = "IQ80321 PCI Memory Space"; | ||
83 | res[1].flags = IORESOURCE_MEM; | ||
84 | |||
85 | request_resource(&ioport_resource, &res[0]); | ||
86 | request_resource(&iomem_resource, &res[1]); | ||
87 | |||
88 | sys->mem_offset = IOP321_PCI_MEM_OFFSET; | ||
89 | sys->io_offset = IOP321_PCI_IO_OFFSET; | ||
90 | |||
91 | sys->resource[0] = &res[0]; | ||
92 | sys->resource[1] = &res[1]; | ||
93 | sys->resource[2] = NULL; | ||
94 | |||
95 | return 1; | ||
96 | } | ||
97 | |||
98 | static void iq80321_preinit(void) | ||
99 | { | ||
100 | iop321_init(); | ||
101 | } | ||
102 | |||
103 | static struct hw_pci iq80321_pci __initdata = { | 64 | static struct hw_pci iq80321_pci __initdata = { |
104 | .swizzle = pci_std_swizzle, | 65 | .swizzle = pci_std_swizzle, |
105 | .nr_controllers = 1, | 66 | .nr_controllers = 1, |
106 | .setup = iq80321_setup, | 67 | .setup = iop3xx_pci_setup, |
107 | .scan = iop321_scan_bus, | 68 | .scan = iop3xx_pci_scan_bus, |
108 | .preinit = iq80321_preinit, | 69 | .preinit = iop3xx_pci_preinit, |
109 | .map_irq = iq80321_map_irq | 70 | .map_irq = iq80321_map_irq |
110 | }; | 71 | }; |
111 | 72 | ||