From patchwork Mon Feb 20 19:49:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1745233 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.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=Bbyo+Kmc; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PLCk93W8Wz23j7 for ; Tue, 21 Feb 2023 06:52:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B3AB85A1A; Mon, 20 Feb 2023 20:51:00 +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="Bbyo+Kmc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C10EF85948; Mon, 20 Feb 2023 20:49:57 +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=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 779EE85977 for ; Mon, 20 Feb 2023 20:49:44 +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-x12e.google.com with SMTP id b16so728704iln.3 for ; Mon, 20 Feb 2023 11:49:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7oDltJhv2wWtyXRnwgK6yFXxFd/soc7ATYxKvFyZLIs=; b=Bbyo+Kmc/p8JGfN4OduoPrVD6rltTQSjXYr0t7yWKB3XfpnSUImG9wl7eMtiCecHYm G9OEPpU2Wbpn8xUk01B9d+fIPAqzZfadVx37WazV1MxhTmwuUbXfQxatRVa+VqDL/uVC eKdb3h+cJSnlwO8T0NXiCBeVGbUxgdCTpzI2I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7oDltJhv2wWtyXRnwgK6yFXxFd/soc7ATYxKvFyZLIs=; b=PC/Qv5ENybTZfU8EIaqgG+ihC/6xRm7kRnG8cXKYzWALkJ3tqmIoPs1HjN20JzhS88 UVbjinqEGGdcJ6unMmh5/ct0d5d5sSsNZr6PX6mX3w3YGvn15MZ86TpTpbrX0SS9pAO3 EXqyEN0gURDRJJcz6iDmBITGiH88jpbcu+zB1YH1//sVdOU4jzuaK/uQKSKp3OjBv3C/ 1GKkri2w3iZ7Hh2mzlHTS6r6bu3ybKqyK2NMD9XJTKuceilIw5SRudJS222FekR4sy1z S5AcIct4Qeg+iy8T09rZlxwpT29L9sH8I/PoQ1YbCmfgDCBdeTRXRHect2EuaajjImqw bLAA== X-Gm-Message-State: AO0yUKVrfAnYH91B/Ayjg+QkqbhH4wsOYE3XYhU2u6/K62Yfc1akkVv5 fQeTlsdwlwqauSLDbTREl1pfePERutlyoSfS X-Google-Smtp-Source: AK7set/PFGZ+cKpFuFwxr047aJ2+LPwrwe9SHG6loD/bNvBTVLUTEvnmETZvtnMORXnyQhJh1fHmiw== X-Received: by 2002:a92:260a:0:b0:315:7a34:227 with SMTP id n10-20020a92260a000000b003157a340227mr2198930ile.32.1676922583014; Mon, 20 Feb 2023 11:49:43 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:9f65:93e2:a4c7:ed10]) by smtp.gmail.com with ESMTPSA id e7-20020a056638020700b003c4ec576030sm587521jaq.4.2023.02.20.11.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 11:49:42 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Andrew Scull , Michal Suchanek , =?utf-8?q?Pali_Roh=C3=A1r?= , =?utf-8?q?Pierre-Cl=C3=A9men?= =?utf-8?q?t_Tosi?= , Stefan Roese Subject: [PATCH 07/13] pci: coreboot: Don't read regions when booting Date: Mon, 20 Feb 2023 12:49:21 -0700 Message-Id: <20230220194927.476708-8-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230220194927.476708-1-sjg@chromium.org> References: <20230220194927.476708-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean When U-Boot is the second-stage bootloader, PCI is already set up. We cannot read the regions from the device tree. There is no point anyway, since PCI devices have already been allocated according to the regions and it is not safe for U-Boot to make any changes. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Christian Gmeiner --- drivers/pci/pci-uclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 9343cfc62a9..8d27e40338c 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -973,6 +973,10 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node, int len; int i; + /* handle booting from coreboot, etc. */ + if (!ll_boot_init()) + return 0; + prop = ofnode_get_property(node, "ranges", &len); if (!prop) { debug("%s: Cannot decode regions\n", __func__);