From patchwork Mon Aug 26 11:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 822454 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp1478208wrh; Mon, 26 Aug 2024 05:03:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXYa5Y5pi99sDXDXJ6yQWCcTJLaXcYfVLcjG1d+DL+z3VvP1Mz2H+tyaD4Pgw6ITh77PI/76g==@linaro.org X-Google-Smtp-Source: AGHT+IH3HrDBYhgg8GshKKqpYfIThxCu+ny1LNOfKzmCWja8iUaX9RKmsJnGczj+skusar9FFNlm X-Received: by 2002:a5d:6211:0:b0:362:2111:4816 with SMTP id ffacd0b85a97d-373118ea91dmr6025782f8f.55.1724673812803; Mon, 26 Aug 2024 05:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724673812; cv=none; d=google.com; s=arc-20240605; b=ljPrGx6s3mDOe0nsKMvMh9532usAQL66H0UfIQd28u3AJ7oEzeclAvFk1/P8glJyTG HPePqQh1PEMAvSYF9Yy6V1yWrRNNclcZ3a8xxpUwiWCpKsb4WPsSnQ0CJGtqleci696T mMTBdvD4HehNW93CgXFLxqNN1F6bNTxRPblg95DDFrtK8Rki00lkdMwOBAtIiOF5PFYU QteXYsE7XgUdAZECooYOH1IhHig2IdqTvCr+XyOtjaX2R4K/mtQZMO7PNzd3f7D8qr3K EU7DJAj90J6rIdMP5jXw/Z8iFWIRhMU23LtcBTmBSawPopbYVyClSz3S2i6RQj8/io5C fVXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=4gRrzYw/g4Upls23TY2bOj7NmOC1+4KQfeR7K1TTt0I=; fh=8IbOOFAUJYCfGYrzM0jWqtoOP7AaZuPOmdHZ5mvNk1Q=; b=RM019Bsnjg7hl8AJ9SPPGgw5VNY2BqqCpKkKA6LSAlADqEREYUvdD/014hw5J75tpG lM5FYykDtXQWVjFvPR4LLlOHlfLNvZBg3UARveyf7r0mHHbFwv/5qNVGplgR+Iw3r9ky uo7nKJvf+ne7i3ZhFHO/FW6cRfE6t7z4fu068tmcoN1Bd5+LQoNDI3C8oB/McT4jbw2o fm+aAGFlNa0ZBbtB17r/VMLcFCLTiSDJVEyN25doLhZM7jswAVO9dxgPGJ35kP0OJnVX pmJZPjBQSS0hLJLUdjtHhme1QaFCqxyQvi87srp4tkscyBmY21A1o59+8mY6kI3AgWVZ 9ycQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 5b1f17b1804b1-42abf0108acsi57182645e9.193.2024.08.26.05.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 05:03:32 -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; 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=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 7272788AF8; Mon, 26 Aug 2024 14:01:35 +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 386A188AF8; Mon, 26 Aug 2024 14:01:34 +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 A4E8A88BFF for ; Mon, 26 Aug 2024 14:01:31 +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 5043DDA7; Mon, 26 Aug 2024 05:01:57 -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 6CB483F762; Mon, 26 Aug 2024 05:01:27 -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 , =?utf-8?q?Marek_Beh=C3=BAn?= , Sughosh Ganu Subject: [PATCH v4 20/27] spl: call spl_board_init() at the end of the spl init sequence Date: Mon, 26 Aug 2024 17:29:33 +0530 Message-Id: <20240826115940.3233167-21-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826115940.3233167-1-sughosh.ganu@linaro.org> References: <20240826115940.3233167-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 V3: 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 ad2dc6a908..c3a4424072 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -711,9 +711,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(); @@ -731,6 +728,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 */