Now that we know the sequence number at bind time, there is no need for
special-case code in dm_pci_hose_probe_bus().

Note: the PCI_CAP_ID_EA code may need a look, but there are no test
failures so I have left it as is.

Signed-off-by: Simon Glass <[email protected]>
---

Changes in v2:
- Use the sequence number directly instead of max bus

 drivers/pci/pci-uclass.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 99dcd342efe..abc3de84db3 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -632,7 +632,7 @@ int dm_pci_hose_probe_bus(struct udevice *bus)
                                    &reg);
                sub_bus = reg;
        } else {
-               sub_bus = pci_get_bus_max() + 1;
+               sub_bus = dev_seq(bus);
        }
        debug("%s: bus = %d/%s\n", __func__, sub_bus, bus->name);
        dm_pciauto_prescan_setup_bridge(bus, sub_bus);
@@ -644,14 +644,6 @@ int dm_pci_hose_probe_bus(struct udevice *bus)
                return ret;
        }
 
-       if (!ea_pos) {
-               if (sub_bus != dev_seq(bus)) {
-                       debug("%s: Internal error, bus '%s' got seq %d, 
expected %d\n",
-                             __func__, bus->name, dev_seq(bus), sub_bus);
-                       return -EPIPE;
-               }
-               sub_bus = pci_get_bus_max();
-       }
        dm_pciauto_postscan_setup_bridge(bus, sub_bus);
 
        return sub_bus;
-- 
2.29.2.576.ga3fc446d84-goog

Reply via email to