[PATCH 3/5] rockchip: sdram: allow config headers to override ATAGs location
Aaron Griffith
aargri at gmail.com
Mon Dec 29 01:05:25 CET 2025
The Rockchip TPL on some SoCs (notably RK3506) place the ATAGS region
somewhere other than the default this code expects. This change allows
that region to be placed somewhere different by defining ATAGS_SIZE
and ATAGS_OFFSET inside a configuration header for either the SoC or
the board.
Signed-off-by: Aaron Griffith <aargri at gmail.com>
---
arch/arm/mach-rockchip/sdram.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 2f39928bcbda2936fb4f079bbb72fa13f80af6c0..98c02570dc4e4a8315c25a5caad5d568db10c5d8 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -38,8 +38,12 @@ struct tos_parameter_t {
#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL_DDR_MEM
/* Tag size and offset */
+#ifndef ATAGS_SIZE
#define ATAGS_SIZE SZ_8K
+#endif
+#ifndef ATAGS_OFFSET
#define ATAGS_OFFSET (SZ_2M - ATAGS_SIZE)
+#endif
#define ATAGS_PHYS_BASE (CFG_SYS_SDRAM_BASE + ATAGS_OFFSET)
#define ATAGS_PHYS_END (ATAGS_PHYS_BASE + ATAGS_SIZE)
--
2.47.3
More information about the U-Boot
mailing list