u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>,
	Alexey Brodkin <alexey.brodkin@synopsys.com>,
	Angelo Dureghello <angelo@sysam.it>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Hai Pham <hai.pham.ud@renesas.com>,
	Michal Simek <monstr@monstr.eu>,
	Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>,
	Tom Rini <trini@konsulko.com>, Wolfgang Denk <wd@denx.de>,
	Ye Li <ye.li@nxp.com>
Subject: [PATCH 06/12] lmb: Remove imx board_lmb_reserve()
Date: Fri, 10 Sep 2021 22:47:12 +0200	[thread overview]
Message-ID: <20210910204718.17765-6-marek.vasut+renesas@gmail.com> (raw)
In-Reply-To: <20210910204718.17765-1-marek.vasut+renesas@gmail.com>

This function is clearly architecture specific code, not board specific
code. The only difference from the previous arm arch_lmb_reserve() is the
extra reservation of 16k of memory below the stack bottom, rather than
the 4k. The common code now also uses 16k alignment. Remove this custom
implementation, as it now behaves exactly as the common code.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Cc: Hai Pham <hai.pham.ud@renesas.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ye Li <ye.li@nxp.com>
---
V2: Drop the custom implementation altogether
---
 arch/arm/mach-imx/misc.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/arch/arm/mach-imx/misc.c b/arch/arm/mach-imx/misc.c
index d82efa7f8f..09a758ff6e 100644
--- a/arch/arm/mach-imx/misc.c
+++ b/arch/arm/mach-imx/misc.c
@@ -77,33 +77,3 @@ int mxs_reset_block(struct mxs_register_32 *reg)
 
 	return 0;
 }
-
-static ulong get_sp(void)
-{
-	ulong ret;
-
-	asm("mov %0, sp" : "=r"(ret) : );
-	return ret;
-}
-
-void board_lmb_reserve(struct lmb *lmb)
-{
-	ulong sp, bank_end;
-	int bank;
-
-	sp = get_sp();
-	debug("## Current stack ends at 0x%08lx ", sp);
-
-	/* adjust sp by 16K to be safe */
-	sp -= 4096 << 2;
-	for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
-		if (sp < gd->bd->bi_dram[bank].start)
-			continue;
-		bank_end = gd->bd->bi_dram[bank].start +
-			gd->bd->bi_dram[bank].size;
-		if (sp >= bank_end)
-			continue;
-		lmb_reserve(lmb, sp, bank_end - sp);
-		break;
-	}
-}
-- 
2.33.0


  parent reply	other threads:[~2021-09-10 20:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 20:47 [PATCH 01/12] lmb: Always compile arch_lmb_reserve() into U-Boot on arm Marek Vasut
2021-09-10 20:47 ` [PATCH 02/12] lmb: Always compile arch_lmb_reserve() into U-Boot on arc Marek Vasut
2021-09-24  2:41   ` Tom Rini
2021-09-10 20:47 ` [PATCH 03/12] lmb: Add generic arch_lmb_reserve_generic() Marek Vasut
2021-09-10 21:10   ` Tom Rini
2021-09-12 19:27   ` Daniel Schwierzeck
2021-09-13  2:08     ` Marek Vasut
2021-09-24  2:41   ` Tom Rini
2021-09-10 20:47 ` [PATCH 04/12] lmb: Switch to " Marek Vasut
2021-09-24  2:41   ` Tom Rini
2021-09-10 20:47 ` [PATCH 05/12] lmb: arm: Increase LMB alignment to 16k in arch_lmb_reserve_generic() Marek Vasut
2021-09-10 21:10   ` Tom Rini
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` Marek Vasut [this message]
2021-09-24  2:42   ` [PATCH 06/12] lmb: Remove imx board_lmb_reserve() Tom Rini
2021-09-10 20:47 ` [PATCH 07/12] lmb: nios2: Add arch_lmb_reserve() Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` [PATCH 08/12] lmb: nds32: " Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` [PATCH 09/12] lmb: riscv: " Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` [PATCH 10/12] lmb: sh: " Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` [PATCH 11/12] lmb: xtensa: " Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-10 20:47 ` [PATCH 12/12] lmb: x86: " Marek Vasut
2021-09-24  2:42   ` Tom Rini
2021-09-24  2:41 ` [PATCH 01/12] lmb: Always compile arch_lmb_reserve() into U-Boot on arm Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910204718.17765-6-marek.vasut+renesas@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=alexey.brodkin@synopsys.com \
    --cc=angelo@sysam.it \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=hai.pham.ud@renesas.com \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=monstr@monstr.eu \
    --cc=simon.k.r.goldschmidt@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).