From patchwork Wed Aug 21 10:58:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 820970 Delivered-To: patch@linaro.org Received: by 2002:adf:e98a:0:b0:367:895a:4699 with SMTP id h10csp640707wrm; Wed, 21 Aug 2024 04:02:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVVg0Zlt6Y0qHrAm/uUYg9oiwsAsNQr7AZNt9vd57kY61hMXtQEjC8ruDrQWjDTIVk0KDXWlw==@linaro.org X-Google-Smtp-Source: AGHT+IGzVrw4k9JMHLKWxCDSuvW28YuuQ4Ser48AkoB2lEPKLOg2Zajl6hYRiFk5JlQ1WF0IC9lv X-Received: by 2002:a05:651c:221b:b0:2ef:2e6b:4105 with SMTP id 38308e7fff4ca-2f3f89533d7mr18759211fa.34.1724238148834; Wed, 21 Aug 2024 04:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724238148; cv=none; d=google.com; s=arc-20160816; b=LFpuO8yEksprPDQ0nAiJ38XDhQ7AIHp+PboA8F4imJDLb8Aow+zbek9+Ik9AQhi+bP nsFyzhh7T9xiZYZFrQW+MdTzGpyfK+pepr52WZxxP9jC3T+o9iW2L2aKXVJX2wDjZjSe qSP9Eqsy6T23PoxtR49N94wZ5xithFjsa7shEOH1bPu1GAAn2FpJ1IdyAKmymGTe6nVd Gdy1upkY4MZj4pC3Dh8rOKRRDhMMiKMulJsG4B15p6DmnxDWNagrVx9lMElAgKb+jsXS nvMsVcxqlESS+iHByzBF/dnQF4tRdotTwD3BbtMvj7OsSRThIyK/YkcWERY71emh+B// 6cPw== 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:references:in-reply-to:message-id:date:subject:cc:to :from; bh=1TPFWk4ZCot4WCUiJcuIydgvuL+WCVvJc4yfe1WH76A=; fh=pnMZGD6unUPoMrkOwzXlkuYg+kVwGnSNRCTlQoWqjVc=; b=XRbVm2gGpvdpG00JcQRdiyNtiOEvOo8g+odEVXa9IErXzanAa9Mx+7MWGK+wlkOmWq xfnLmPaGISFwrULELBleR1bFR3Vr6XXdPlrZqFN/k6mAk0QAdwdijxeiuNlqGi8IWcEB Ezl6w1KbTg1s6cGfcJEuUvAJ5D8TDbeGAlFU58zLkn3x6pKO0tHrt1DvP3QnXigt33Bx 63TICMyWjpif9/hrT0+D+Emmeq7/AO6HSH81g/xE2kQBinf1xl6CXViBotkPGUyUUSOt /I9qk1924NxYslftRW6FJX7AZu1hlIX6GawnliDQE9Q2/WDBgJAl4qucUHm9UevF69pC E5HQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5bebc0b6688si8057973a12.543.2024.08.21.04.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 04:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (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 1FC4D88C20; Wed, 21 Aug 2024 13:00:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id F018088DD0; Wed, 21 Aug 2024 13:00:19 +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=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id E3BDD88DDF for ; Wed, 21 Aug 2024 13:00:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66B4ADA7; Wed, 21 Aug 2024 04:00:41 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 05BFC3F73B; Wed, 21 Aug 2024 04:00:11 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Marek Vasut , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , Sughosh Ganu Subject: [PATCH v3 20/27] spl: call spl_board_init() at the end of the spl init sequence Date: Wed, 21 Aug 2024 16:28:32 +0530 Message-Id: <20240821105839.2870293-21-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240821105839.2870293-1-sughosh.ganu@linaro.org> References: <20240821105839.2870293-1-sughosh.ganu@linaro.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.8 at phobos.denx.de X-Virus-Status: Clean The spl_board_init() function on sandbox invokes the unit tests. Invoking the tests should be done once the rest of the system has been initialised. Call the spl_board_init() function at the very end, once the rest of the initilisation functions have been called, including the setting up of the LMB memory map. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V2: None common/spl/spl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 4102e25115..f58c1f97b9 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -713,9 +713,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2) if (CONFIG_IS_ENABLED(SOC_INIT)) spl_soc_init(); - if (CONFIG_IS_ENABLED(BOARD_INIT)) - spl_board_init(); - if (IS_ENABLED(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT)) initr_watchdog(); @@ -733,6 +730,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2) /* Don't fail. We still can try other boot methods. */ } + if (CONFIG_IS_ENABLED(BOARD_INIT)) + spl_board_init(); + bootcount_inc(); /* Dump driver model states to aid analysis */