From patchwork Mon May 10 06:31:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 433031 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2564387jao; Sun, 9 May 2021 23:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1IEFSsoNp6FSBH7iIDLucHyRl7npNIjtoa1l4+ATvBDmNnnSpVXrtE2drOf29JdPclVnb X-Received: by 2002:aa7:d40e:: with SMTP id z14mr22520426edq.73.1620628279013; Sun, 09 May 2021 23:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620628279; cv=none; d=google.com; s=arc-20160816; b=ZcUD8Bu6DBCTuXsSNJtt6Avs9aO1MRLbL3bc+Z7hLMhn9D82o42vO4lZ9Sz0K1e8oC ih49MSLRcikUOsc7UKVi3VJhmQI255tnc34uIaaWvRA12orjrljS0B1IJ5cTTiZ54m/t pPjQob+IqSInwUM7QVi89XF6NlQO1+2f84hUZf9Qsw6OyzI1WGFp+EPz0RUiYeUKmzzQ 8DAr9ZMvj1qSRYWEiuO8oiQ9gI7xF7GCYY+FK1QyeNkcbY6YmXfUMDWKHf2zO+cjek0U KKxiLRNJ+6dE+NJaeug6sA3bc4ljYskpjD06EIMkjYnbDqXChT8RezlMBtmyA/tv065N z/Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=8JuwnyjUQoQmG+UhiM4SlX663SBaUpMiztf2nxsYscA=; b=MATbUJr8HRi79WafM50Rfa2qYYOpw2KZIzdyNS9KJAf8N1Szbxik0aN1+SoE6yCPzE IfuvudKW/A79+r4pROcwiJsRImL6v4VQC7L6gC5Zx2fs3uys8mFsX9jpGgYi8P7Ln6mF lhVpR6DoJMxq5O6z1worw2aLXOWgOZyd2xA6cfolQNTWSu349AY1k6ukgyU5IKpH6IBv kufIOQxUGxhTKe++3PFTxaWv/j/OLQOTzst/KzK8oMBPdZzWt83kwWVeO/XhaDqRUVyf ijtV7CFFrRzC/rQhDZWCBsaYw+H5aL8n7bGHBBp9iqZTat34WZLQh/SnggCxt/kAZZQF E1zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkUKyr53; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id gr23si12513444ejb.87.2021.05.09.23.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 23:31:18 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KkUKyr53; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EAEA582B71; Mon, 10 May 2021 08:31:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KkUKyr53"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AC35882EB1; Mon, 10 May 2021 08:31:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EB51E82B41 for ; Mon, 10 May 2021 08:31:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pj1-x102e.google.com with SMTP id l10-20020a17090a850ab0290155b06f6267so9456341pjn.5 for ; Sun, 09 May 2021 23:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8JuwnyjUQoQmG+UhiM4SlX663SBaUpMiztf2nxsYscA=; b=KkUKyr53r76kmMzDzX7+UAdcBhsguYhsrOHQmpKOBLVeUZJUNMLKCeJYaYXSDsfC8u n3tShBhMj+fvSoIFrHsO4WzQmmQ9ZpqviiwnSy0NvzuFR2FCFA77JipdwNMWzloutunT h+14xHEdWfU9/CSGtGhVsPHXEOhFUs4+sVEzsjcARfB+1VL5ppHWNJReNr+cxXtA4rwT C6q/bbs2l+tXEGQbKNx+Hv4RrofEo5QUONfv1PCn9ojtAQb730gdzlmCgdzTr8CXSjrW it6garDfg+wDwy9fpvTvz7VYZEw9dKe2S7rYlbKNTwmvMY4dYWZFLNzI9aaty2CjxipR z0Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=8JuwnyjUQoQmG+UhiM4SlX663SBaUpMiztf2nxsYscA=; b=q+BrncMJ4iJl/Dp8FSYtsh3zn8SxVnqVoHfmSXzQcQGJegHT4LALd3dlJbeDODjJb7 d1UwXYtqGCXhqF7tWgrEyM4TeVkr1WTYlk9wfpI0WnKER/4df16EYe46yn5ur8W42Fp3 eFSvlVIouyVjephLMhpukci/Nu2ZnbElx60lM8PJMZcBA+W6E378u1Jpc17lBX5UQOhW E6SkM+JLFdY3581YZgiaeWHdpyQUSZEoemvoZdDk0kfH9crIdBaJDtnKw7w6DFWghVfb fo5mhfzK+5hI6tr0zH6Zm+k8wF8hrSe0b7xuLHMn+4bDmZmwcxbp6or5VLSbMwGMypjj 0Q2A== X-Gm-Message-State: AOAM532AY+xtugrrMao4RH3mdDX9vg+zqXPZdZ1xRh5xFftbbvvVJ6GF ZdUrku1RYCE323CJYhXzHkT2rw== X-Received: by 2002:a17:90a:20b:: with SMTP id c11mr25176622pjc.44.1620628270251; Sun, 09 May 2021 23:31:10 -0700 (PDT) Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp. [210.141.244.193]) by smtp.gmail.com with ESMTPSA id d3sm17914103pjw.35.2021.05.09.23.31.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 23:31:09 -0700 (PDT) From: Masami Hiramatsu To: Peng Fan , Simon Glass , Tom Rini , Heinrich Schuchardt , Alexander Graf , Jagan Teki , Vignesh R , Joe Hershberger , Ramon Fried , Sughosh Ganu Cc: Masami Hiramatsu , Jassi Brar , Ilias Apalodimas , Masahisa Kojima , Takahiro Akashi , Tim Harvey , Bin Meng , u-boot@lists.denx.de Subject: [PATCH v3 01/14] pci: Update the highest subordinate bus number for bridge setup Date: Mon, 10 May 2021 15:31:05 +0900 Message-Id: <162062826490.501222.2760653538005920634.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <162062825393.501222.13616174511857694530.stgit@localhost> References: <162062825393.501222.13616174511857694530.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Update the highest subordinate bus number after probing the devices under the bus for setting up the bridge correctly. The commit 42f3663a3f67 ("pci: Update to use new sequence numbers") removed this but it is required if a PCIe bridge is under the bus. Fixes: 42f3663a3f67 ("pci: Update to use new sequence numbers") Signed-off-by: Masami Hiramatsu Reviewed-by: Simon Glass Tested-by: Tim Harvey --- drivers/pci/pci-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index dfd54b339f..f463ef3550 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -646,6 +646,9 @@ int dm_pci_hose_probe_bus(struct udevice *bus) return log_msg_ret("probe", ret); } + if (!ea_pos) + sub_bus = pci_get_bus_max(); + dm_pciauto_postscan_setup_bridge(bus, sub_bus); return sub_bus;