Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2786DC74A5B for ; Thu, 23 Mar 2023 18:40:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 75E1585CB7; Thu, 23 Mar 2023 19:39:33 +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="Wpbx84qY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0AA985A1B; Thu, 23 Mar 2023 19:39:21 +0100 (CET) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 72811859A0 for ; Thu, 23 Mar 2023 19:39:19 +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-pf1-x435.google.com with SMTP id u38so9065340pfg.10 for ; Thu, 23 Mar 2023 11:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679596757; 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=86RIpqP6CSM4gXMAI70sBH5+s6B8wQ9LQFIbXBusMtg=; b=Wpbx84qYBLHjRfEOmoKFwgMmI+8/B9mQnhv9KTI/p7lJay/ryGhXKQUAUNaDA0ecyO 8bNruRzeXheGdu6MAMSXrIefQtEjsHsLCHkX/YGghUxWRO4arhHMDXSseez7/AjxFglm qB3MODpwEq1JW1ZIbi2gQmcxs85dtn8kcMyuU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679596757; 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=86RIpqP6CSM4gXMAI70sBH5+s6B8wQ9LQFIbXBusMtg=; b=eKzD4G6FJMJLmMmOLVheOEOttoSkqYhEi+NL/1VWEMxooCPEvT0+LgPuw3+UW3oXwn 1zXwh9BQrTh64KodjvsJk6AYwK1WJ9oKpNGFuPiFE3z8CQc7HkHUMwuLWBDRE0j7Ysp4 T5YBpASHyQT6tGa2S9qY8KxGLzKzQXxQWgCfFujjlF8BLo1AsnWx46px8+1OnCw8m7FY bhHeINHyVle7z64rmZpzaAYtfvpptlkQGjGB4XuLQ9xu3qLywPwzKrNTEjrGf8zeTZnd vSDLFyhwVEj9K3ylqRRyrb+c7fFxhveH7cSsGruiym8xnYKLGmtHaa6sXOVH2hQZDoNe 4GKw== X-Gm-Message-State: AAQBX9fB10JsUuIFqueeEinnfeaafGKgQQuQTenJS8VetPDHVqqvfbDm 3/hUP4nPm2dMlUA1rIvKAX4IN5LNUZvR1hj9hWs= X-Google-Smtp-Source: AKy350bH+DNJloV7rto3rjmiHW0UzBuUeujVwNya9brhr0vxstoT/8529QqX9v8fL0iKFu+1996HKg== X-Received: by 2002:a62:1c45:0:b0:626:1523:b10d with SMTP id c66-20020a621c45000000b006261523b10dmr408607pfc.4.1679596757669; Thu, 23 Mar 2023 11:39:17 -0700 (PDT) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id c18-20020a62e812000000b006227c3d5e29sm12733029pfi.16.2023.03.23.11.39.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Mar 2023 11:39:17 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass Subject: [PATCH v2 08/16] pci: coreboot: Don't read regions when booting Date: Fri, 24 Mar 2023 07:31:49 +1300 Message-Id: <20230323183157.1520223-4-sjg@chromium.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230323183157.1520223-1-sjg@chromium.org> References: <20230323183157.1520223-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.8 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 --- (no changes since v1) 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 9343cfc62a96..8d27e40338cf 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__); -- 2.40.0.348.gf938b09366-goog