From patchwork Mon Aug 26 11:59:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 822447 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp1477353wrh; Mon, 26 Aug 2024 05:02:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW/t8pemPuh8n9j6WuxvXBQUvi7dIoW+dz59qkDghnFh4HCjau563JobormDYLJQIPpFcu9KQ==@linaro.org X-Google-Smtp-Source: AGHT+IFMiPfQXgP2IdRPhOeEN8kaA2fw4UBJ1b6yqDQAs2EKYFhJAgUnisr3AZto3m8SS8ZZ+c7A X-Received: by 2002:a05:600c:4706:b0:426:8ee5:5d24 with SMTP id 5b1f17b1804b1-42acc8e23f9mr76393705e9.20.1724673742610; Mon, 26 Aug 2024 05:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724673742; cv=none; d=google.com; s=arc-20240605; b=UzVb7HxyadmAVy6NRZuPTHwFVbntMsE8B52UmxMrTu47LtanMwDOoPi2fYVx0jP9Uv ugmAKvbHQ9HuO/9cnjMMoE9xinznboWsrxx7BaAXor68TJfte59Zhei5tPMtLPjfTwXc 7AqE2jSMQlKgW5byteL4Gg8A30B5OBk/FlJbD69+obZNhOXOjTPjO+1wZdzjZfhS0EO0 7ChlNCLWyhLES0eo9eLYetWWcfHF0wWPZpy6sr6MsGijKKrPLBWeQGhmQD8oHjaJe6DJ WTp3hXtNu0YzMTkFaCpigOFoFweVWM8XLcSYRwu5DIWGDio4WoWzCi0eybukrhyPLile mMyg== 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=by/8SKKpfxQhvZ/Q9MMSdohJE1q7opmEzwKJJVWe2Dg=; fh=8IbOOFAUJYCfGYrzM0jWqtoOP7AaZuPOmdHZ5mvNk1Q=; b=TLDvqYSXspbj5xOdYU5RLmFxABpxoJD0NxTq3dUHCX0Bj5khrwPog/3OKsFJ2dlFPR wqiW/hyCpSbNTY8/b5wncSR8ezyjOSuoyKSr4iiCU77nosOqSHcUb707lT3foyuGN6ut yGsAPckRpl1+MZQN2ntRWXVLGq6y96YLhVWSoiEQSSsPqKqiDOdiwnch+9Pfclji1JP1 rNFa55mLLiHhhMNKomcRFiwO2aUFRh4JxSH/8tqsgq2Hol33tmG3c3X6MUQBLLCoRlJt exroRUKLBBzpuXoFyIOdIvZXcur1uFxIJ5to6VkwrugOW02IncZLLWyXVD3ygAXIljzQ 8cNg==; 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-42ac514ded3si46886295e9.21.2024.08.26.05.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 05:02:22 -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 82F0388A00; Mon, 26 Aug 2024 14:01:04 +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 EED7B8806A; Mon, 26 Aug 2024 14:01:03 +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 CDC4388AFB for ; Mon, 26 Aug 2024 14:01:01 +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 7B3C1DA7; Mon, 26 Aug 2024 05:01:27 -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 97CFD3F762; Mon, 26 Aug 2024 05:00:57 -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 13/27] lmb: remove lmb_init_and_reserve_range() function Date: Mon, 26 Aug 2024 17:29:26 +0530 Message-Id: <20240826115940.3233167-14-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 With the move to make the LMB allocations persistent and the common memory regions being reserved during board init, there is no need for an explicit reservation of a memory range. Remove the lmb_init_and_reserve_range() function. Signed-off-by: Sughosh Ganu Reviewed-by: Ilias Apalodimas Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- Changes since V3: None boot/bootm.c | 15 +-------------- include/lmb.h | 3 --- lib/lmb.c | 8 -------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index e244b9b410..ddede08979 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -239,18 +239,7 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images, return 0; } -#if CONFIG_IS_ENABLED(LMB) -static void boot_start_lmb(void) -{ - phys_addr_t mem_start; - phys_size_t mem_size; - - mem_start = env_get_bootm_low(); - mem_size = env_get_bootm_size(); - - lmb_init_and_reserve_range(mem_start, mem_size, NULL); -} -#else +#if !CONFIG_IS_ENABLED(LMB) #define lmb_reserve(base, size) static inline void boot_start_lmb(void) { } #endif @@ -260,8 +249,6 @@ static int bootm_start(void) memset((void *)&images, 0, sizeof(images)); images.verify = env_get_yesno("verify"); - boot_start_lmb(); - bootstage_mark_name(BOOTSTAGE_ID_BOOTM_START, "bootm_start"); images.state = BOOTM_STATE_START; diff --git a/include/lmb.h b/include/lmb.h index 04558724a7..2f155d706e 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -63,9 +63,6 @@ struct lmb { */ int lmb_init(void); -void lmb_init_and_reserve_range(phys_addr_t base, phys_size_t size, - void *fdt_blob); - /** * lmb_add_memory() - Add memory range for LMB allocations * diff --git a/lib/lmb.c b/lib/lmb.c index de4d0d1803..686988e34f 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -227,14 +227,6 @@ static void lmb_reserve_common(void *fdt_blob) efi_lmb_reserve(); } -/* Initialize the struct, add memory and call arch/board reserve functions */ -void lmb_init_and_reserve_range(phys_addr_t base, phys_size_t size, - void *fdt_blob) -{ - lmb_add(base, size); - lmb_reserve_common(fdt_blob); -} - static __maybe_unused void lmb_reserve_common_spl(void) { phys_addr_t rsv_start;