diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-10-28 18:26:16 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 15:10:56 -0500 |
commit | 37d15909ff6bf6e97e1d4447efa7f1a19e7a508e (patch) | |
tree | 03d1be5fc753995295a6812e4bed485be73d2512 /arch/arm/mach-tegra/pcie.c | |
parent | a2f33da11ab9efba25d41e959de6338a9078fb36 (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-tegra/pcie.c')
-rw-r--r-- | arch/arm/mach-tegra/pcie.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 97ef3e55dfdf..92947d86fc87 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c | |||
@@ -409,7 +409,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) | |||
409 | pp->res[0].flags = IORESOURCE_IO; | 409 | pp->res[0].flags = IORESOURCE_IO; |
410 | if (request_resource(&ioport_resource, &pp->res[0])) | 410 | if (request_resource(&ioport_resource, &pp->res[0])) |
411 | panic("Request PCIe IO resource failed\n"); | 411 | panic("Request PCIe IO resource failed\n"); |
412 | sys->resource[0] = &pp->res[0]; | 412 | pci_add_resource(&sys->resources, &pp->res[0]); |
413 | 413 | ||
414 | /* | 414 | /* |
415 | * IORESOURCE_MEM | 415 | * IORESOURCE_MEM |
@@ -428,7 +428,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) | |||
428 | pp->res[1].flags = IORESOURCE_MEM; | 428 | pp->res[1].flags = IORESOURCE_MEM; |
429 | if (request_resource(&iomem_resource, &pp->res[1])) | 429 | if (request_resource(&iomem_resource, &pp->res[1])) |
430 | panic("Request PCIe Memory resource failed\n"); | 430 | panic("Request PCIe Memory resource failed\n"); |
431 | sys->resource[1] = &pp->res[1]; | 431 | pci_add_resource(&sys->resources, &pp->res[1]); |
432 | 432 | ||
433 | /* | 433 | /* |
434 | * IORESOURCE_MEM | IORESOURCE_PREFETCH | 434 | * IORESOURCE_MEM | IORESOURCE_PREFETCH |
@@ -447,7 +447,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) | |||
447 | pp->res[2].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; | 447 | pp->res[2].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; |
448 | if (request_resource(&iomem_resource, &pp->res[2])) | 448 | if (request_resource(&iomem_resource, &pp->res[2])) |
449 | panic("Request PCIe Prefetch Memory resource failed\n"); | 449 | panic("Request PCIe Prefetch Memory resource failed\n"); |
450 | sys->resource[2] = &pp->res[2]; | 450 | pci_add_resource(&sys->resources, &pp->res[2]); |
451 | 451 | ||
452 | return 1; | 452 | return 1; |
453 | } | 453 | } |
@@ -468,7 +468,8 @@ static struct pci_bus __init *tegra_pcie_scan_bus(int nr, | |||
468 | pp = tegra_pcie.port + nr; | 468 | pp = tegra_pcie.port + nr; |
469 | pp->root_bus_nr = sys->busnr; | 469 | pp->root_bus_nr = sys->busnr; |
470 | 470 | ||
471 | return pci_scan_bus(sys->busnr, &tegra_pcie_ops, sys); | 471 | return pci_scan_root_bus(NULL, sys->busnr, &tegra_pcie_ops, sys, |
472 | &sys->resources); | ||
472 | } | 473 | } |
473 | 474 | ||
474 | static struct hw_pci tegra_pcie_hw __initdata = { | 475 | static struct hw_pci tegra_pcie_hw __initdata = { |