summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Kurniawan Soemardi <[email protected]>2026-02-17 08:51:34 +0000
committerCasey Connolly <[email protected]>2026-04-27 12:33:30 +0200
commit0bbde64361d96000ff4f4ff20d060745064f2b98 (patch)
treefa55b712dfe6b30f39c7942f513b577b063cc75b
parentca080b83a41fbc873ed5e7ed3ea674ee0a4b886a (diff)
mach-snapdragon: allocate memory for DT overlays
Allocate a 1 MiB LMB region for fdtoverlay_addr_r when CONFIG_OF_LIBFDT_OVERLAY is enabled, allowing runtime application of DT overlays on Snapdragon platforms. This is useful for Android-based boot flows where the final DT passed to the kernel must contain modified /firmware/android/fstab entries. One use case is redirecting system and vendor partitions to microSD storage instead of internal eMMC without rebuilding the base DTB. The allocation is conditional on CONFIG_OF_LIBFDT_OVERLAY and has no effect on boards that do not enable overlay support. Signed-off-by: Antony Kurniawan Soemardi <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
-rw-r--r--arch/arm/mach-snapdragon/board.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index 5fb3240acc5..829a0109ac7 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -555,6 +555,11 @@ int board_late_init(void)
fdt_status |= !lmb_alloc(SZ_2M, &addr) ?
env_set_hex("fdt_addr_r", addr) : 1;
+ if (IS_ENABLED(CONFIG_OF_LIBFDT_OVERLAY)) {
+ status |= !lmb_alloc(SZ_1M, &addr) ?
+ env_set_hex("fdtoverlay_addr_r", addr) : 1;
+ }
+
if (status || fdt_status)
log_warning("%s: Failed to set run time variables\n", __func__);