Message ID | 20240724060224.3071065-33-sughosh.ganu@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2619686wro; Tue, 23 Jul 2024 23:11:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWA+2eyOv9LhCx+zNWOiUDoWTv7piaCaiwU3ppXK2maAzX9SweuEo6WPGaptUkP+kC3lTgT1J4NOlqPBSjr8Gu4 X-Google-Smtp-Source: AGHT+IFuVMyW86PYYAFAEJJ6FA2gq56huMS+m5KrIHDb+grb/utBs1qXA/UCXBxmPpQuYcAfzFKM X-Received: by 2002:a05:600c:a43:b0:426:668f:5eca with SMTP id 5b1f17b1804b1-427f7a153fbmr10950125e9.7.1721801480499; Tue, 23 Jul 2024 23:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721801480; cv=none; d=google.com; s=arc-20160816; b=RR02pEYZiK+WZrIx60MmSBKQYBbX5pcFspRKbz5QYVQ+sS8M5VtI8PCnomblNOn7kD Z5h86SEq0kRcTFEu64mKrAgXLCEvV77ErBwr/IqPDZihtFhLveQw9vA6ctNM/O7ymr4S nIfygWGLDSDAKgdcTGEEDMZBaQ79rgd3d8wvhn/+/zw3Jy6ookt7NXgBQIMbXlAVA1nz cAxxLT8IB9cDlgdtewBw+ERByRn213pb6PeYq3Mv0z3f7ZQxt8YBeSpz4+heBXFeNCFI LUaB2bmy+k97lcV/ELy2F0kjG7zDyY6bcv6o/KDxPTO3+eoqJrqRPMwXjKHAN1kfvdXl mjjQ== 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=V3MpvI83xq2k9WiiwUWQuryg7ggjnR9MNbKw79NrYlg=; fh=eimiGswTlodK8yi2DcDfSicmKwvq5bxKQKpD+SkkTNY=; b=rCWxa8dj8GV1x952QCHH6/fHsAOZL04qE/zTM2BfMdXe++On/c4DUmCqssFRHfkyVB X0/lcMe58y0bK0Dqc2W5JoTEu6qRHwisRrYQX74WPD/YmTFxAycY/1lfKsGO9mjaX+5G XaI/ZsVL9X8+WwwGavqkMjSSTK4LopTVYmHOpMet0rGE6hG+jAi9iyeX6XgwS1l6QPpM K3Crz0VJzxpcUnwpp4sOg50oRePXtVz4z0JmGiu87H/+fM6s1FnGH8koKS2Ut2gKRYJv oOyd4tmdVsOMqrAzUeggXjMg3V4CCLGbhAHxFhW3fYtkbhALiq0qsBUJiJ3RacPBgvxv 5QDg==; 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: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-427f9359f02si3682745e9.14.2024.07.23.23.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 23:11:20 -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 26EB288920; Wed, 24 Jul 2024 08:05:47 +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 BD8B988886; Wed, 24 Jul 2024 08:05:46 +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 7335888965 for <u-boot@lists.denx.de>; Wed, 24 Jul 2024 08:05:29 +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 62C88106F; Tue, 23 Jul 2024 23:05:54 -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 507713F766; Tue, 23 Jul 2024 23:05:24 -0700 (PDT) From: Sughosh Ganu <sughosh.ganu@linaro.org> To: u-boot@lists.denx.de Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org>, Marek Vasut <marex@denx.de>, Mark Kettenis <mark.kettenis@xs4all.nl>, Michal Simek <michal.simek@amd.com>, Patrick DELAUNAY <patrick.delaunay@foss.st.com>, Patrice CHOTARD <patrice.chotard@foss.st.com>, Huan Wang <alison.wang@nxp.com>, Angelo Dureghello <angelo@kernel-space.org>, Daniel Schwierzeck <daniel.schwierzeck@gmail.com>, Thomas Chou <thomas@wytron.com.tw>, Rick Chen <rick@andestech.com>, Max Filippov <jcmvbkbc@gmail.com>, Sughosh Ganu <sughosh.ganu@linaro.org> Subject: [PATCH 32/40] stm32mp: do not add lmb memory before relocation Date: Wed, 24 Jul 2024 11:32:16 +0530 Message-Id: <20240724060224.3071065-33-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 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
Make LMB memory map global and persistent
|
expand
|
diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c index 97d894d05f..32f2a95ed8 100644 --- a/arch/arm/mach-stm32mp/dram_init.c +++ b/arch/arm/mach-stm32mp/dram_init.c @@ -57,15 +57,8 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size) */ gd->ram_top = clamp_val(gd->ram_top, 0, SZ_4G - 1); - /* found enough not-reserved memory to relocated U-Boot */ - lmb_add(gd->ram_base, gd->ram_top - gd->ram_base, LMB_NONE); - boot_fdt_add_mem_rsv_regions((void *)gd->fdt_blob); - /* add 8M for reserved memory for display, fdt, gd,... */ - size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE), - reg = lmb_alloc(size, MMU_SECTION_SIZE, LMB_NONE); - - if (!reg) - reg = gd->ram_top - size; + size = ALIGN(SZ_8M + CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE); + reg = gd->ram_top - size; /* before relocation, mark the U-Boot memory as cacheable by default */ if (!(gd->flags & GD_FLG_RELOC))
The LMB memory map is now being handled through data structures which need heap memory to be operational. Moreover, the LMB memory map is initialised as part of the board boot after relocation as part of platform agnostic code. Remove addition of LMB memory before relocation for the stm32mp platforms. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> --- Changes since rfc: New patch arch/arm/mach-stm32mp/dram_init.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)