aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2011-10-28 18:26:16 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-01-06 15:10:56 -0500
commit37d15909ff6bf6e97e1d4447efa7f1a19e7a508e (patch)
tree03d1be5fc753995295a6812e4bed485be73d2512 /arch/arm/mach-orion5x
parenta2f33da11ab9efba25d41e959de6338a9078fb36 (diff)
arm/PCI: convert to pci_scan_root_bus() for correct root bus resources
Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus resource fixups. This fixes the problem of "early" and "header" quirks seeing incorrect root bus resources. CC: Russell King <linux@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index bc4a920e26e..4eb93647aab 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -176,7 +176,7 @@ static int __init pcie_setup(struct pci_sys_data *sys)
176 res[0].end = res[0].start + ORION5X_PCIE_IO_SIZE - 1; 176 res[0].end = res[0].start + ORION5X_PCIE_IO_SIZE - 1;
177 if (request_resource(&ioport_resource, &res[0])) 177 if (request_resource(&ioport_resource, &res[0]))
178 panic("Request PCIe IO resource failed\n"); 178 panic("Request PCIe IO resource failed\n");
179 sys->resource[0] = &res[0]; 179 pci_add_resource(&sys->resources, &res[0]);
180 180
181 /* 181 /*
182 * IORESOURCE_MEM 182 * IORESOURCE_MEM
@@ -187,9 +187,8 @@ static int __init pcie_setup(struct pci_sys_data *sys)
187 res[1].end = res[1].start + ORION5X_PCIE_MEM_SIZE - 1; 187 res[1].end = res[1].start + ORION5X_PCIE_MEM_SIZE - 1;
188 if (request_resource(&iomem_resource, &res[1])) 188 if (request_resource(&iomem_resource, &res[1]))
189 panic("Request PCIe Memory resource failed\n"); 189 panic("Request PCIe Memory resource failed\n");
190 sys->resource[1] = &res[1]; 190 pci_add_resource(&sys->resources, &res[1]);
191 191
192 sys->resource[2] = NULL;
193 sys->io_offset = 0; 192 sys->io_offset = 0;
194 193
195 return 1; 194 return 1;
@@ -505,7 +504,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
505 res[0].end = res[0].start + ORION5X_PCI_IO_SIZE - 1; 504 res[0].end = res[0].start + ORION5X_PCI_IO_SIZE - 1;
506 if (request_resource(&ioport_resource, &res[0])) 505 if (request_resource(&ioport_resource, &res[0]))
507 panic("Request PCI IO resource failed\n"); 506 panic("Request PCI IO resource failed\n");
508 sys->resource[0] = &res[0]; 507 pci_add_resource(&sys->resources, &res[0]);
509 508
510 /* 509 /*
511 * IORESOURCE_MEM 510 * IORESOURCE_MEM
@@ -516,9 +515,8 @@ static int __init pci_setup(struct pci_sys_data *sys)
516 res[1].end = res[1].start + ORION5X_PCI_MEM_SIZE - 1; 515 res[1].end = res[1].start + ORION5X_PCI_MEM_SIZE - 1;
517 if (request_resource(&iomem_resource, &res[1])) 516 if (request_resource(&iomem_resource, &res[1]))
518 panic("Request PCI Memory resource failed\n"); 517 panic("Request PCI Memory resource failed\n");
519 sys->resource[1] = &res[1]; 518 pci_add_resource(&sys->resources, &res[1]);
520 519
521 sys->resource[2] = NULL;
522 sys->io_offset = 0; 520 sys->io_offset = 0;
523 521
524 return 1; 522 return 1;
@@ -579,9 +577,11 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys
579 struct pci_bus *bus; 577 struct pci_bus *bus;
580 578
581 if (nr == 0) { 579 if (nr == 0) {
582 bus = pci_scan_bus(sys->busnr, &pcie_ops, sys); 580 bus = pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys,
581 &sys->resources);
583 } else if (nr == 1 && !orion5x_pci_disabled) { 582 } else if (nr == 1 && !orion5x_pci_disabled) {
584 bus = pci_scan_bus(sys->busnr, &pci_ops, sys); 583 bus = pci_scan_root_bus(NULL, sys->busnr, &pci_ops, sys,
584 &sys->resources);
585 } else { 585 } else {
586 bus = NULL; 586 bus = NULL;
587 BUG(); 587 BUG();