
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.behun@nic.cz Cc: Stefan Roese sr@denx.de Cc: Anton Schubert anton.schubert@gmx.de Cc: Dirk Eibach dirk.eibach@gdsys.cc Cc: Mario Six mario.six@gdsys.cc Cc: Chris Packham chris.packham@alliedtelesis.co.nz Cc: Phil Sutter phil@nwl.cc Cc: VlaoMao vlaomao@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; }