diff options
Diffstat (limited to 'arch/arm/mach-versatile/pci.c')
-rw-r--r-- | arch/arm/mach-versatile/pci.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 15c6a00000ec..bec933b04ef0 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -169,11 +169,18 @@ static struct pci_ops pci_versatile_ops = { | |||
169 | .write = versatile_write_config, | 169 | .write = versatile_write_config, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | static struct resource io_port = { | ||
173 | .name = "PCI", | ||
174 | .start = 0, | ||
175 | .end = IO_SPACE_LIMIT, | ||
176 | .flags = IORESOURCE_IO, | ||
177 | }; | ||
178 | |||
172 | static struct resource io_mem = { | 179 | static struct resource io_mem = { |
173 | .name = "PCI I/O space", | 180 | .name = "PCI I/O space", |
174 | .start = VERSATILE_PCI_MEM_BASE0, | 181 | .start = VERSATILE_PCI_MEM_BASE0, |
175 | .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1, | 182 | .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1, |
176 | .flags = IORESOURCE_IO, | 183 | .flags = IORESOURCE_MEM, |
177 | }; | 184 | }; |
178 | 185 | ||
179 | static struct resource non_mem = { | 186 | static struct resource non_mem = { |
@@ -200,6 +207,12 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) | |||
200 | "memory region (%d)\n", ret); | 207 | "memory region (%d)\n", ret); |
201 | goto out; | 208 | goto out; |
202 | } | 209 | } |
210 | ret = request_resource(&ioport_resource, &io_port); | ||
211 | if (ret) { | ||
212 | printk(KERN_ERR "PCI: unable to allocate I/O " | ||
213 | "port region (%d)\n", ret); | ||
214 | goto out; | ||
215 | } | ||
203 | ret = request_resource(&iomem_resource, &non_mem); | 216 | ret = request_resource(&iomem_resource, &non_mem); |
204 | if (ret) { | 217 | if (ret) { |
205 | printk(KERN_ERR "PCI: unable to allocate non-prefetchable " | 218 | printk(KERN_ERR "PCI: unable to allocate non-prefetchable " |
@@ -218,7 +231,7 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys) | |||
218 | * the mem resource for this bus | 231 | * the mem resource for this bus |
219 | * the prefetch mem resource for this bus | 232 | * the prefetch mem resource for this bus |
220 | */ | 233 | */ |
221 | pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset); | 234 | pci_add_resource_offset(&sys->resources, &io_port, sys->io_offset); |
222 | pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset); | 235 | pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset); |
223 | pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset); | 236 | pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset); |
224 | 237 | ||
@@ -249,6 +262,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
249 | 262 | ||
250 | if (nr == 0) { | 263 | if (nr == 0) { |
251 | sys->mem_offset = 0; | 264 | sys->mem_offset = 0; |
265 | sys->io_offset = 0; | ||
252 | ret = pci_versatile_setup_resources(sys); | 266 | ret = pci_versatile_setup_resources(sys); |
253 | if (ret < 0) { | 267 | if (ret < 0) { |
254 | printk("pci_versatile_setup: resources... oops?\n"); | 268 | printk("pci_versatile_setup: resources... oops?\n"); |