From: Paresh Bhagat Date: Wed, 1 Jul 2026 07:50:21 +0000 (+0530) Subject: arm: mach-k3: Add DM reserved memory fixup X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cceea6e449888f4422e674e7157696d382eb686;p=thirdparty%2Fu-boot.git 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 Reviewed-by: Neha Malcom Francis --- 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)