From patchwork Fri Jun 7 18:52:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 802318 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp948871wro; Fri, 7 Jun 2024 11:54:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNDYvgZzJBlkiZ0pnYNeNqMLgMoif7bel/u0hRqll6cIRwLRWCL1Mfctnol7p7QXM2eqyVh6wP0qipvIqy5d7g X-Google-Smtp-Source: AGHT+IE2WLT9FAsaScvZ0/F/aavoyuw2fZgLXr8WokdkrNPRq82MU8XTx4TE+fiUSmQxJ+lPwQbu X-Received: by 2002:a05:6512:3681:b0:52b:8728:5ea6 with SMTP id 2adb3069b0e04-52bb9f75959mr1881812e87.19.1717786491566; Fri, 07 Jun 2024 11:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717786491; cv=none; d=google.com; s=arc-20160816; b=B30uxFE5fTmQIcfGPiDyaSDKOryR3YAAdk5gbvFSJ1sIWDZWr+XEimbGm2EnhToWBW a9XX4bGDsuxm1DeXzpxxSFNzLUk0UYblldWks3tahNnuMCMOMSaY91YcDjDrai+SPmE0 6Z0AG9mC4t5muJbLpU4t5aLCz8iXhTcqDlw345WIfqdAkF5O096wDj0IRVOvZOm90xwb efv6p9UbvjzSX5LKgNWTrqg8KiWzXQIL6Q6s6mIiyzLSUa7O0+qNfL0Mv34lr7VRpjVf iELEWWuljO9q8LEBoHX+iF1WEtbdVXo5FfaBglsHqODiMKitQU+coRGnruwqQOcZ7CuI hDIg== 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=yhlR2OWdgnxymgVSNTA3oBq5OXqYBZMTMjut+0ptESg=; fh=xLSOOz5Q0Mrmzd+lwBRTYS7D/8TpUWM8TEHgIjpMzow=; b=QLigtrZjaxEr5ybrt8rUvRRNLlcs5fEfAbqi3Dtkjv0znc1X+OhN52yBWpSqnsYDIS JEYhSYzDCvz+l0lkvrbZhXMwbfA2/Wdoh52t9vOVPwQp+Pjn5dksfA/V4BacQr/Y9KJ0 zQgQUrmf47wUWaGJkZ5PiITFBTRjWYNRooWr38ZaQO/TTwYrStAVoDvn9FOMPCSWQMET aAQWsua3lvbOe05v7GXMRKYG3rf5isPCVomxdtcMoUmcCSGMmoiEDosEWneS1b2smcQS MHvBPbvcKtfdhG4Et8+It/BJb6oYQX7NRnu484MrKdS7zvAa2pz/hpBHUmyNzFLiN5Rf jYxw==; 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 a640c23a62f3a-a6e977b5df1si68420466b.186.2024.06.07.11.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 11:54:51 -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 F2909884BE; Fri, 7 Jun 2024 20:53:59 +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 E2C67884BC; Fri, 7 Jun 2024 20:53:57 +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 EB309884A7 for ; Fri, 7 Jun 2024 20:53:55 +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 D9C101480; Fri, 7 Jun 2024 11:54:19 -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 C1D123F792; Fri, 7 Jun 2024 11:53:52 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mark Kettenis , Fabio Estevam , Sughosh Ganu Subject: [RFC PATCH 07/31] lmb: remove lmb_init_and_reserve_range() function Date: Sat, 8 Jun 2024 00:22:16 +0530 Message-Id: <20240607185240.1892031-8-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240607185240.1892031-1-sughosh.ganu@linaro.org> References: <20240607185240.1892031-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, the lmb_init_and_reserve_range() API can be replaced with a simple lmb_add() call. Signed-off-by: Sughosh Ganu Reviewed-by: Tom Rini Reviewed-by: Ilias Apalodimas --- boot/bootm.c | 2 +- include/lmb.h | 2 -- lib/lmb.c | 8 -------- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index cd1003120c..73e72a710d 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -248,7 +248,7 @@ static void boot_start_lmb(void) mem_start = env_get_bootm_low(); mem_size = env_get_bootm_size(); - lmb_init_and_reserve_range(mem_start, mem_size, NULL); + lmb_add(mem_start, mem_size); } #else #define lmb_reserve(base, size) diff --git a/include/lmb.h b/include/lmb.h index d2b829ace1..f3e3f716e5 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -85,8 +85,6 @@ struct lmb { }; void lmb_init_and_reserve(struct bd_info *bd, void *fdt_blob); -void lmb_init_and_reserve_range(phys_addr_t base, phys_size_t size, - void *fdt_blob); long lmb_add(phys_addr_t base, phys_size_t size); long lmb_reserve(phys_addr_t base, phys_size_t size); /** diff --git a/lib/lmb.c b/lib/lmb.c index 8003aae6f7..5c056800c3 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -253,14 +253,6 @@ void lmb_init_and_reserve(struct bd_info *bd, void *fdt_blob) lmb_reserve_common(fdt_blob); } -/* 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); -} - /* This routine called with relocation disabled. */ static long lmb_add_region_flags(struct lmb_region *rgn, phys_addr_t base, phys_size_t size, enum lmb_flags flags)