PCI: versatile: Use pci_host_probe() to register host
The versatile 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-9-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
This commit is contained in:
Родитель
d7169a94f1
Коммит
a4b21b858b
|
@ -70,7 +70,6 @@ static int versatile_pci_probe(struct platform_device *pdev)
|
|||
int ret, i, myslot = -1, mem = 1;
|
||||
u32 val;
|
||||
void __iomem *local_pci_cfg_base;
|
||||
struct pci_bus *bus, *child;
|
||||
struct pci_host_bridge *bridge;
|
||||
|
||||
bridge = devm_pci_alloc_host_bridge(dev, 0);
|
||||
|
@ -164,18 +163,7 @@ static int versatile_pci_probe(struct platform_device *pdev)
|
|||
bridge->map_irq = of_irq_parse_and_map_pci;
|
||||
bridge->swizzle_irq = pci_common_swizzle;
|
||||
|
||||
ret = pci_scan_root_bus_bridge(bridge);
|
||||
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);
|
||||
|
||||
return 0;
|
||||
return pci_host_probe(bridge);
|
||||
}
|
||||
|
||||
static const struct of_device_id versatile_pci_of_match[] = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче