]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: mach-k3: Add DM reserved memory fixup
authorParesh Bhagat <p-bhagat@ti.com>
Wed, 1 Jul 2026 07:50:21 +0000 (13:20 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jul 2026 18:04:48 +0000 (12:04 -0600)
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 <p-bhagat@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
arch/arm/mach-k3/common_fdt.c

index 4b833f5fabedf33912429b7fb465c652efe419e1..18f30e9d052557ac6e9be459bf420bc596ce34be 100644 (file)
@@ -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)