]> git.sur5r.net Git - u-boot/blobdiff - drivers/pci/pci-uclass.c
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / drivers / pci / pci-uclass.c
index 230d18142df164ee5a6cc6b9a523531865ca8988..3b00e6a41b36c040e3c1298bf4f5b1248c51872a 100644 (file)
@@ -752,19 +752,6 @@ error:
        return ret;
 }
 
-static int pci_uclass_post_bind(struct udevice *bus)
-{
-       /*
-        * Scan the device tree for devices. This does not probe the PCI bus,
-        * as this is not permitted while binding. It just finds devices
-        * mentioned in the device tree.
-        *
-        * Before relocation, only bind devices marked for pre-relocation
-        * use.
-        */
-       return dm_scan_fdt_dev(bus);
-}
-
 static int decode_regions(struct pci_controller *hose, const void *blob,
                          int parent_node, int node)
 {
@@ -850,7 +837,7 @@ static int pci_uclass_pre_probe(struct udevice *bus)
        hose = bus->uclass_priv;
 
        /* For bridges, use the top-level PCI controller */
-       if (device_get_uclass_id(bus->parent) == UCLASS_ROOT) {
+       if (!device_is_on_pci_bus(bus)) {
                hose->ctlr = bus;
                ret = decode_regions(hose, gd->fdt_blob, bus->parent->of_offset,
                                bus->of_offset);
@@ -1245,7 +1232,7 @@ UCLASS_DRIVER(pci) = {
        .id             = UCLASS_PCI,
        .name           = "pci",
        .flags          = DM_UC_FLAG_SEQ_ALIAS,
-       .post_bind      = pci_uclass_post_bind,
+       .post_bind      = dm_scan_fdt_dev,
        .pre_probe      = pci_uclass_pre_probe,
        .post_probe     = pci_uclass_post_probe,
        .child_post_bind = pci_uclass_child_post_bind,