Skip to content

Commit 1df7930

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: dwc: Convert to use pci_host_probe()
Now that there are no more .scan_bus() callbacks, we can remove it and just use pci_host_probe(). Link: https://lore.kernel.org/r/20200821035420.380495-17-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Jingoo Han <jingoohan1@gmail.com> Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Bjorn Helgaas <bhelgaas@google.com>
1 parent 6ab15b5 commit 1df7930

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

drivers/pci/controller/dwc/pcie-designware-host.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
300300
struct device_node *np = dev->of_node;
301301
struct platform_device *pdev = to_platform_device(dev);
302302
struct resource_entry *win;
303-
struct pci_bus *child;
304303
struct pci_host_bridge *bridge;
305304
struct resource *cfg_res;
306305
int ret;
@@ -436,23 +435,9 @@ int dw_pcie_host_init(struct pcie_port *pp)
436435

437436
bridge->sysdata = pp;
438437

439-
ret = pci_scan_root_bus_bridge(bridge);
440-
if (ret)
441-
goto err_free_msi;
442-
443-
pp->root_bus = bridge->bus;
444-
445-
if (pp->ops->scan_bus)
446-
pp->ops->scan_bus(pp);
447-
448-
pci_bus_size_bridges(pp->root_bus);
449-
pci_bus_assign_resources(pp->root_bus);
450-
451-
list_for_each_entry(child, &pp->root_bus->children, node)
452-
pcie_bus_configure_settings(child);
453-
454-
pci_bus_add_devices(pp->root_bus);
455-
return 0;
438+
ret = pci_host_probe(bridge);
439+
if (!ret)
440+
return 0;
456441

457442
err_free_msi:
458443
if (pci_msi_enabled() && !pp->ops->msi_host_init)

drivers/pci/controller/dwc/pcie-designware.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ enum dw_pcie_device_mode {
161161

162162
struct dw_pcie_host_ops {
163163
int (*host_init)(struct pcie_port *pp);
164-
void (*scan_bus)(struct pcie_port *pp);
165164
void (*set_num_vectors)(struct pcie_port *pp);
166165
int (*msi_host_init)(struct pcie_port *pp);
167166
};

0 commit comments

Comments
 (0)