From patchwork Wed Jul 24 06:02:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 814151 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2619454wro; Tue, 23 Jul 2024 23:10:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVG3rqv0uLsaUKQFQ8nP/W2IU1mULJ0ULPgSdEzGZpMUraYmSRQLIeTINIVzt78BFzmifumdtwkPIAPoRZPRqC1 X-Google-Smtp-Source: AGHT+IFIaLttMnKyE4QBzN842XBS/13HU8JFeZfvyA0RgHIdKj6SDMZv21Lo3OsbVYOZnk6oVKre X-Received: by 2002:a5d:554a:0:b0:366:e9fa:178 with SMTP id ffacd0b85a97d-369f5a64990mr629933f8f.0.1721801423853; Tue, 23 Jul 2024 23:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721801423; cv=none; d=google.com; s=arc-20160816; b=Eix55yplbuPAxQ1cNYaXHxVb0DCRODOeUkHiO2WyvLGh1H152W7dBrITwmHkc7svxo oDZF0udKB+RFn++hGVJSLm5hdpo6eyCiZWa0T08PBYWHPkHWTPYxoB/mxF7oQo/xMwtG LijBXRhCpOvuoCBCvvlIQZGtVhPfRNs4LjvG0nT0jBNoBHcvou0aCx4oXOUjE4cnair3 phiMrQkwwlMlYuBmMaD8Ke8jGZdnM9/hxiJ/5Oji9MCHm40CgzmFsULao1EOn6ek6axz eeRnyTu4X0kUXqueYr0dXrP0cPioG09UuvET2rxC3moE6c1vbRs+Qd3zM0criw/HP2qo +T+w== 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=SnIRzyYvY0TEB2HOUDKjzojT0UDn8Y0geSLO+jdOe58=; fh=eimiGswTlodK8yi2DcDfSicmKwvq5bxKQKpD+SkkTNY=; b=0z1diiRQlLmXFvUMrroXappgyFFFogH9kerBQTVbVeBdLYg+lt6jjV+yUFy94zKd+F WXDFcCRIE+dPxBtWbpYr9WcHU6i6VKwiKvDxmmcoscV4WugY8aZkdgrfpWhfz/SSV1E8 k3AkzL8SVeqU3ED7pyAA4lnrvu8tzkgeAct7V1vOJiZGDTLJtREW1JEaj513LwLiEpfg dKfHngwO0SEw+11CPtemi0jRz1sv5Gp11eUILJnvfh3mfaWhaJsQaB985Cid3x+gPUIi LIHlGvRpNeXS20NxeQLLXL9GQLwapvZiX4XEYFIACItSljW8AvhpptcPED5GSy3GOJvj JaaQ==; 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 ffacd0b85a97d-369e3700b69si1354513f8f.377.2024.07.23.23.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 23:10:23 -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 F0F9488955; Wed, 24 Jul 2024 08:05:17 +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 66B1F88906; Wed, 24 Jul 2024 08:05:06 +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 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 ECC198890F for ; Wed, 24 Jul 2024 08:04:57 +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 DF608152B; Tue, 23 Jul 2024 23:05:22 -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 CB9DD3F766; Tue, 23 Jul 2024 23:04:52 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , Huan Wang , Angelo Dureghello , Daniel Schwierzeck , Thomas Chou , Rick Chen , Max Filippov , Sughosh Ganu Subject: [PATCH 26/40] spl: call spl_board_init() at the end of the spl init sequence Date: Wed, 24 Jul 2024 11:32:10 +0530 Message-Id: <20240724060224.3071065-27-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240724060224.3071065-1-sughosh.ganu@linaro.org> References: <20240724060224.3071065-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 rfc: New patch 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 38ac0608bb..891edde156 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 */