The ofdata_to_platdata method for this driver returns -ENODEV if link is
down for a given bus, for example if there is no device in the slot.
This causes the uclass_{first,next}_device to return NULL for this bus
in pci-uclass.c:pci_init, which of course stops probing of buses which
come after.

So if the slot on the first bus is empty on Turris Omnia, and the slot
on second bus has a device connected, the device is not probed in
U-Boot. On Turris Omnia the PCIe devices have to be probed in U-Boot to
work correctly in Linux. Therefore we need this fix.

Signed-off-by: Marek Behún <marek.be...@nic.cz>
Cc: Stefan Roese <s...@denx.de>
Cc: Anton Schubert <anton.schub...@gmx.de>
Cc: Dirk Eibach <dirk.eib...@gdsys.cc>
Cc: Mario Six <mario....@gdsys.cc>
Cc: Chris Packham <chris.pack...@alliedtelesis.co.nz>
Cc: Phil Sutter <p...@nwl.cc>
Cc: VlaoMao <vlao...@gmail.com>
---
 drivers/pci/pci_mvebu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 653f445a0f..7ec6a2be27 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -436,7 +436,6 @@ static int mvebu_pcie_ofdata_to_platdata(struct udevice 
*dev)
        /* Check link and skip ports that have no link */
        if (!mvebu_pcie_link_up(pcie)) {
                debug("%s: %s - down\n", __func__, pcie->name);
-               ret = -ENODEV;
                goto err;
        }
 
-- 
2.21.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to