[PATCH] ARM: i.MX: drop explicit reservation of scratch area
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Aug 14 02:38:24 PDT 2024
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 at 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
More information about the barebox
mailing list