aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-06-24 13:55:59 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-06-29 10:41:50 +1000
commit5f744b25222f0f9d47a0f57c5858b5a8a1b523dc (patch)
treec2c29d363539c65c5bebacb5d2c02c41f2e31007
parent42d2ea084bab5f86c42e10fbb99effa5e7d38d48 (diff)
downloadpci-5f744b25222f0f9d47a0f57c5858b5a8a1b523dc.tar.gz
PCI: controller: versatile: Use pci_host_resource_survey()
Use this instead of pci_assign_unassigned_bus_resources() as it is more appropriate for a host bridge. The result should be equivalent based on the default ARM policy. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--drivers/pci/controller/pci-versatile.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c
index f59ad2728c0b32..b86e7dee901eda 100644
--- a/drivers/pci/controller/pci-versatile.c
+++ b/drivers/pci/controller/pci-versatile.c
@@ -118,7 +118,6 @@ static int versatile_pci_probe(struct platform_device *pdev)
int ret, i, myslot = -1;
u32 val;
void __iomem *local_pci_cfg_base;
- struct pci_bus *bus, *child;
struct pci_host_bridge *bridge;
LIST_HEAD(pci_res);
@@ -209,12 +208,8 @@ static int versatile_pci_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
- bus = bridge->bus;
-
- pci_assign_unassigned_bus_resources(bus);
- list_for_each_entry(child, &bus->children, node)
- pcie_bus_configure_settings(child);
- pci_bus_add_devices(bus);
+ pci_host_resource_survey(bridge->bus);
+ pci_bus_add_devices(bridge->bus);
return 0;
}