From patchwork Mon Nov 30 01:53:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1407938 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=PXzmu4gS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CkpJm3xnQz9sVD for ; Mon, 30 Nov 2020 12:57:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D6B8827CC; Mon, 30 Nov 2020 02:56:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PXzmu4gS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26C2C827B6; Mon, 30 Nov 2020 02:55:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (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 D278B827A1 for ; Mon, 30 Nov 2020 02:54:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x143.google.com with SMTP id t13so9837910ilp.2 for ; Sun, 29 Nov 2020 17:54:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ViGDrt9yNAjl1o4lXCRQ3zjCc9Us61X4pGqacBBCyKc=; b=PXzmu4gSaQ1K4LfHEf3+M4tphnXWHT8PtWxZHoOKxezzSK4aeWtE9uGTCkLg9FXrsX Pi+85GrRPmaFiJn+LiYH13SK1clK2OzCSYm0qT9kNgmI1PCDLBDx6su1aJWt4Kaz5los c/eRVT8WYSfOiNrZo+SeGy1hGPopkTv2/XEq0= 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:mime-version:content-transfer-encoding; bh=ViGDrt9yNAjl1o4lXCRQ3zjCc9Us61X4pGqacBBCyKc=; b=O1vTIVXEjuO5DB3vpTwK4g9ybP1CdEUqJliDHwDpmUDmLQmJ8U47b1Lq/DNxtJ7sqO 3nBUth4Q9EoW7n1DftS3Z7ELU0xscM4qUaSgdIyXf5Utb20JRLIERjt5ZH0VEbeD0O2O RPh8T1dqxdox7YN8KNbjpZU031HwnHI1b4pkcl6MzT2wQHq7J4VHEiaCGJrl66YdAZOj fjlY8/7ZZsjvIyUKbCvyVfxMMtXWUX6kEOWuwV+DKfGMkOPKPkeguVA7BTuF+VWiL3Gv 6Ac5TDg41eqyrg1WUhPSirzTguNY65wZonBWlJ4Eb3OsRZwQYbVTCd4qyl2Uq4iNjk/6 vRyw== X-Gm-Message-State: AOAM532mTf/PTGzSChbK0EBWth4ZOjcS79YG6HM/gx7d99L2NCJer/V6 QxMoyVHY07QVqnmjj6MVzPrJMAZFmzjUTQ== X-Google-Smtp-Source: ABdhPJyBQM43+0Y0MERzf+na2mCa0U5TFe3tGfb0aYo8jN1/EA0lNJpsslhtaGtijrqNfQUDC3fLCg== X-Received: by 2002:a92:cac4:: with SMTP id m4mr16046642ilq.252.1606701288545; Sun, 29 Nov 2020 17:54:48 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id q5sm6543341ilg.62.2020.11.29.17.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 17:54:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Andy Shevchenko , Bin Meng , Rayagonda Kokatanur , Stefan Roese , Suneel Garapati Subject: [PATCH 13/27] pci: Update to use new sequence numbers Date: Sun, 29 Nov 2020 18:53:48 -0700 Message-Id: <20201130015402.2328621-12-sjg@chromium.org> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog In-Reply-To: <20201130015402.2328621-1-sjg@chromium.org> References: <20201130015402.2328621-1-sjg@chromium.org> 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.3 at phobos.denx.de X-Virus-Status: Clean 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 --- 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) ®); 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;