From patchwork Tue May 14 14:58:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1099538 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nic.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="IXdf1meP"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 453LRx0lN1z9sN6 for ; Wed, 15 May 2019 00:59:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C809BC21F9D; Tue, 14 May 2019 14:59:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 13E63C21D8E; Tue, 14 May 2019 14:59:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 683FCC21D8E; Tue, 14 May 2019 14:59:01 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id C8126C21C8B for ; Tue, 14 May 2019 14:58:59 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id 676AC66862; Tue, 14 May 2019 16:58:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1557845939; bh=X16PqW8tV5lhWKU36JWXccbogDyLmxBg1tuT2chNQrY=; h=From:To:Date; b=IXdf1mePB9pzlRlG95BYqnyIgzI4YCt5usphCl1oZC57OmcTWJD+tyz02AgIpd9r6 UTdqJe0AJjVrKZqyzxhg+WPYuyYnikZpAjfW1nIp6hnzvVEDLm9ZkwuMyrMsU0Qx9o MpUkUc9Vy5ZfPH7Yo6GiygkjIs1VzfdFwwdDdKao= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Tue, 14 May 2019 16:58:59 +0200 Message-Id: <20190514145859.27839-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Phil Sutter , Anton Schubert , Chris Packham , Dirk Eibach , Stefan Roese , VlaoMao Subject: [U-Boot] [PATCH 1/1] pci: pci_mvebu: fix bus enumeration if some buses have empty slots X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Cc: Stefan Roese Cc: Anton Schubert Cc: Dirk Eibach Cc: Mario Six Cc: Chris Packham Cc: Phil Sutter Cc: VlaoMao --- 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; }