From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] ARM: i.MX: drop explicit reservation of scratch area
Date: Wed, 14 Aug 2024 11:38:24 +0200 [thread overview]
Message-ID: <20240814093824.71656-1-a.fatoum@pengutronix.de> (raw)
The scratch area is just some unused space between top of stack and end
of early memory / start of OP-TEE. There's nothing i.MX specific about
it, except that we use it to store the bootrom log.
The initcall reserving the scratch area was added to avoid barebox
proper overwriting it later on during boot.
Since commit 59289e3d8cc3 ("memory: add support for requesting barebox
area as a whole"), the scratch area is reserved as part of the barebox
memory region, so it's unnecessary to keep around SoC-specific code
for its reservation, so let's just drop it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Alternative to https://lore.barebox.org/barebox/22b84d30-0f41-4592-ad89-1a8c8b6c5308@pengutronix.de/T/#u
The SoC initcall change there is wrong and I will tackle that later.
---
arch/arm/mach-imx/scratch.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/mach-imx/scratch.c b/arch/arm/mach-imx/scratch.c
index b7280ff60952..e4e2d25969f0 100644
--- a/arch/arm/mach-imx/scratch.c
+++ b/arch/arm/mach-imx/scratch.c
@@ -92,11 +92,3 @@ const struct optee_header *imx_scratch_get_optee_hdr(void)
return &scratch->optee_hdr;
}
-
-static int imx8m_reserve_scratch_area(void)
-{
- return request_barebox_region("scratch area",
- (ulong)arm_mem_scratch_get(),
- sizeof(struct imx_scratch_space)) ? 0 : -EINVAL;
-}
-device_initcall(imx8m_reserve_scratch_area);
--
2.39.2
next reply other threads:[~2024-08-14 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 9:38 Ahmad Fatoum [this message]
2024-08-14 10:39 ` Sascha Hauer
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=20240814093824.71656-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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