summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParesh Bhagat <[email protected]>2026-07-01 13:20:21 +0530
committerTom Rini <[email protected]>2026-07-16 12:04:48 -0600
commit0cceea6e449888f4422e674e7157696d382eb686 (patch)
tree21c4c54ee4f71d3c9711108b9ba61d3bc1262a80
parent5e2be9f5ccc4ca3c9cd326d4671a853b783adcae (diff)
arm: mach-k3: Add DM reserved memory fixup
Add support for fixing up DM firmware reserved memory in the kernel device tree for K3 SoCs that use separate DM firmware. The fixup uses the CONFIG_K3_DM_FW_RESERVED_ADDR and CONFIG_K3_DM_FW_RESERVED_SIZE Kconfig options to update the reserved-memory node with the correct DM firmware carveout. Note that the fixup needs DM reserved memory node is to be renamed in dts. Example memory@9c900000 → dm@9c900000 Signed-off-by: Paresh Bhagat <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
-rw-r--r--arch/arm/mach-k3/common_fdt.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c
index 4b833f5fabe..18f30e9d052 100644
--- a/arch/arm/mach-k3/common_fdt.c
+++ b/arch/arm/mach-k3/common_fdt.c
@@ -160,9 +160,23 @@ int fdt_fixup_reserved(void *blob)
if (ret)
return ret;
- return fdt_fixup_reserved_memory(blob, "optee",
- CONFIG_K3_OPTEE_LOAD_ADDR,
- CONFIG_K3_OPTEE_RESERVED_SIZE);
+ ret = fdt_fixup_reserved_memory(blob, "optee",
+ CONFIG_K3_OPTEE_LOAD_ADDR,
+ CONFIG_K3_OPTEE_RESERVED_SIZE);
+
+ if (ret)
+ return ret;
+
+#if defined(CONFIG_K3_DM_FW_RESERVED_ADDR) && defined(CONFIG_K3_DM_FW_RESERVED_SIZE)
+ ret = fdt_fixup_reserved_memory(blob, "dm",
+ CONFIG_K3_DM_FW_RESERVED_ADDR,
+ CONFIG_K3_DM_FW_RESERVED_SIZE);
+
+ if (ret)
+ return ret;
+#endif
+
+ return 0;
}
static int fdt_fixup_critical_trips(void *blob, int zoneoffset, int maxc)