diff options
author | Rob Herring <robh@kernel.org> | 2020-05-22 17:48:29 -0600 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2020-07-10 11:50:23 +0100 |
commit | 56d2923484704a261f91f5fd0d4dd35f5b3ebb19 (patch) | |
tree | 8f6c247ddb4d8ad6206fc302d58f54d6c65f2ded /drivers/pci/controller/pcie-rcar-host.c | |
parent | PCI: iproc: Use pci_host_probe() to register host (diff) | |
download | wireguard-linux-56d2923484704a261f91f5fd0d4dd35f5b3ebb19.tar.xz wireguard-linux-56d2923484704a261f91f5fd0d4dd35f5b3ebb19.zip |
PCI: rcar: Use pci_host_probe() to register host
The rcar host driver does the same host registration and bus scanning
calls as pci_host_probe, so let's use it instead.
Link: https://lore.kernel.org/r/20200522234832.954484-13-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-renesas-soc@vger.kernel.org
Diffstat (limited to 'drivers/pci/controller/pcie-rcar-host.c')
-rw-r--r-- | drivers/pci/controller/pcie-rcar-host.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index d210a36561be..9069ad96fe95 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -330,8 +330,6 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host) struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host); struct rcar_pcie *pcie = &host->pcie; struct device *dev = pcie->dev; - struct pci_bus *bus, *child; - int ret; /* Try setting 5 GT/s link speed */ rcar_pcie_force_speedup(pcie); @@ -349,21 +347,7 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host) if (IS_ENABLED(CONFIG_PCI_MSI)) bridge->msi = &host->msi.chip; - ret = pci_scan_root_bus_bridge(bridge); - if (ret < 0) - return ret; - - bus = bridge->bus; - - 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); - - return 0; + return pci_host_probe(bridge); } static int phy_wait_for_ack(struct rcar_pcie *pcie) |