diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-17 17:37:22 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-24 14:03:57 +1000 |
commit | 7fd6ca00dfed7a762574c82172129c9ec5927878 (patch) | |
tree | 387656a6ab03fe9c0071119d407ad6216632db40 | |
parent | 7c7a2a1fd1ce2a6665e72aea2dcb34d1c7c19247 (diff) | |
download | pci-7fd6ca00dfed7a762574c82172129c9ec5927878.tar.gz |
PCI: controller: mvebu: Use pci_host_resource_survey
This replaces the open coded equivalent
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | drivers/pci/controller/pci-mvebu.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index d3a0419e42f28c..afd529d0fee1ef 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -1010,7 +1010,6 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) static int mvebu_pci_host_probe(struct pci_host_bridge *bridge) { struct mvebu_pcie *pcie; - struct pci_bus *bus, *child; int ret; ret = pci_scan_root_bus_bridge(bridge); @@ -1027,24 +1026,10 @@ static int mvebu_pci_host_probe(struct pci_host_bridge *bridge) pci_ioremap_io(i, pcie->io.start + i); } - bus = bridge->bus; + /* Setup resources */ + pci_host_resource_survey(bridge->bus); - /* - * We insert PCI resources into the iomem_resource and - * ioport_resource trees in either pci_bus_claim_resources() - * or pci_bus_assign_resources(). - */ - if (pci_has_flag(PCI_PROBE_ONLY)) { - pci_bus_claim_resources(bus); - } else { - pci_bus_size_bridges(bus); - pci_bus_assign_resources(bus); - - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - } - - pci_bus_add_devices(bus); + pci_bus_add_devices(bridge->bus); return 0; } |