From patchwork Wed Jul 24 06:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 814150 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2619346wro; Tue, 23 Jul 2024 23:10:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGdmL90hH8JUu982fBRQBQglyKF0J9nLKYCbusA9/Dzy7jI0z3MoD+/Q7Z8DdSFMHa0KRpTbjO0Mt4EPxByFoh X-Google-Smtp-Source: AGHT+IGxM6h4zuZ0Dkql4IgBvtq9SHRLiVJi31L03OyHOg4bM0Op4PwbHNhc5fhm7nCCyhY21G29 X-Received: by 2002:a05:600c:3543:b0:426:6308:e2f0 with SMTP id 5b1f17b1804b1-427f7a645dfmr10011145e9.26.1721801402017; Tue, 23 Jul 2024 23:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721801402; cv=none; d=google.com; s=arc-20160816; b=PfWmdHdaVpZ2elAM6rfGn31xf7RIlgW6uUYo1OLnyK+wYycbDYV0XLis/ecpyA0Oyj vETROw2e4bk+udqocGcL3Ie5IGNwuJ1jxCU1Hc6zNhGdV0Haa7zqoRc2alyk5apnFLw4 7/ncT2Vm5/Es8VmrrMzXTyJHDzv39nvYQ8TPLP8x7Y41qCLTlJxfDg2TYeAtJE/18bd7 O4rgyK8P8Ykzs9qSVAUIWad5z5XXCPh3dvhBJO/Lql0jY1S28ZsfB0Z8pxRS0isQZy92 3H6Et/TYs5BW1c+eLpbZ2Kfk/TIj+W9QFWg4zyxjKruAIl5jLjEG72vW5RxsdN0DHwxp CU/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=sJpzTY5IbGWQlGh6SXUra6/wy7fvA3ibJtsITl6cyOE=; fh=eimiGswTlodK8yi2DcDfSicmKwvq5bxKQKpD+SkkTNY=; b=ZbIW89XNlE1XHkfcCLpyelH2V1G08+bb06sFkFj3feis4iC+TqyINLa1sKjqJsLS7m dUIcEA9UkBoTt0bvbhsarzN7aywepORN7bLJAP+hqECY69pLC1faGDN204sY+jbEZnrm C6GdaPdKVkMorJNH5LGqG9N+ggIbYWwigoLVhKeAkgP9nDbcMNFfRB66uabadn2CaQFB FrAMgcqw0MyYzMmCoo+WFNlNilUdmlpuePXIGuIK5XUOLjnVqpZ13r+4zl6n0wgWhqwv ncdi4ZpOpijC+o9gx6dEGMzZML1YoqPELfC2MDNwtjaoKqnRXv/nKM54ESWFQEorOKOv SbVQ==; 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-427f942063bsi3577895e9.218.2024.07.23.23.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 23:10:02 -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 8DF6E88931; Wed, 24 Jul 2024 08:05:12 +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 64E4888920; 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,T_FILL_THIS_FORM_SHORT 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 22A4888906 for ; Wed, 24 Jul 2024 08:05:03 +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 16AB3106F; Tue, 23 Jul 2024 23:05:28 -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 ED83B3F766; Tue, 23 Jul 2024 23:04:57 -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 27/40] spl: sandbox: initialise the ram banksize in spl Date: Wed, 24 Jul 2024 11:32:11 +0530 Message-Id: <20240724060224.3071065-28-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 Initialise the ram bank information for sandbox in SPL. This is needed for initialising the LMB memory map as part of the platform init. Signed-off-by: Sughosh Ganu --- Changes since rfc: New patch arch/sandbox/cpu/spl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 9ad9da686c..22cd916685 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -121,6 +121,15 @@ static int load_from_image(struct spl_image_info *spl_image, } SPL_LOAD_IMAGE_METHOD("sandbox_image", 7, BOOT_DEVICE_BOARD, load_from_image); +int dram_init_banksize(void) +{ + /* These are necessary so TFTP can use LMBs to check its load address */ + gd->bd->bi_dram[0].start = gd->ram_base; + gd->bd->bi_dram[0].size = get_effective_memsize(); + + return 0; +} + void spl_board_init(void) { struct sandbox_state *state = state_get_current(); @@ -128,10 +137,6 @@ void spl_board_init(void) if (!CONFIG_IS_ENABLED(UNIT_TEST)) return; - /* These are necessary so TFTP can use LMBs to check its load address */ - gd->bd->bi_dram[0].start = gd->ram_base; - gd->bd->bi_dram[0].size = get_effective_memsize(); - if (state->run_unittests) { struct unit_test *tests = UNIT_TEST_ALL_START(); const int count = UNIT_TEST_ALL_COUNT();