diff options
Diffstat (limited to 'arch/arm/mach-iop33x/iq80332-pci.c')
-rw-r--r-- | arch/arm/mach-iop33x/iq80332-pci.c | 45 |
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 f3010f85b1a2..0de8aa748dd8 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) | |||
63 | return PCI_IRQ_TABLE_LOOKUP(1, 7); | 63 | return PCI_IRQ_TABLE_LOOKUP(1, 7); |
64 | } | 64 | } |
65 | 65 | ||
66 | static int iq80332_setup(int nr, struct pci_sys_data *sys) | ||
67 | { | ||
68 | struct resource *res; | ||
69 | |||
70 | if(nr != 0) | ||
71 | return 0; | ||
72 | |||
73 | res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL); | ||
74 | if (!res) | ||
75 | panic("PCI: unable to alloc resources"); | ||
76 | |||
77 | res[0].start = IOP331_PCI_LOWER_IO_VA; | ||
78 | res[0].end = IOP331_PCI_UPPER_IO_VA; | ||
79 | res[0].name = "IQ80332 PCI I/O Space"; | ||
80 | res[0].flags = IORESOURCE_IO; | ||
81 | |||
82 | res[1].start = IOP331_PCI_LOWER_MEM_PA; | ||
83 | res[1].end = IOP331_PCI_UPPER_MEM_PA; | ||
84 | res[1].name = "IQ80332 PCI Memory Space"; | ||
85 | res[1].flags = IORESOURCE_MEM; | ||
86 | |||
87 | request_resource(&ioport_resource, &res[0]); | ||
88 | request_resource(&iomem_resource, &res[1]); | ||
89 | |||
90 | sys->mem_offset = IOP331_PCI_MEM_OFFSET; | ||
91 | sys->io_offset = IOP331_PCI_IO_OFFSET; | ||
92 | |||
93 | sys->resource[0] = &res[0]; | ||
94 | sys->resource[1] = &res[1]; | ||
95 | sys->resource[2] = NULL; | ||
96 | |||
97 | return 1; | ||
98 | } | ||
99 | |||
100 | static void iq80332_preinit(void) | ||
101 | { | ||
102 | iop331_init(); | ||
103 | } | ||
104 | |||
105 | static struct hw_pci iq80332_pci __initdata = { | 66 | static struct hw_pci iq80332_pci __initdata = { |
106 | .swizzle = pci_std_swizzle, | 67 | .swizzle = pci_std_swizzle, |
107 | .nr_controllers = 1, | 68 | .nr_controllers = 1, |
108 | .setup = iq80332_setup, | 69 | .setup = iop3xx_pci_setup, |
109 | .scan = iop331_scan_bus, | 70 | .scan = iop3xx_pci_scan_bus, |
110 | .preinit = iq80332_preinit, | 71 | .preinit = iop3xx_pci_preinit, |
111 | .map_irq = iq80332_map_irq | 72 | .map_irq = iq80332_map_irq |
112 | }; | 73 | }; |
113 | 74 | ||