diff options
| author | Tom Rini <[email protected]> | 2026-07-17 10:15:17 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-07-17 10:15:17 -0600 |
| commit | a66e02d219bedaca5aa8abaeac279c634dd2587d (patch) | |
| tree | 11e6897447bbfa37b69e8cdb3dd114a99a5336c4 | |
| parent | 96c308b8d2a6a1496c0a7366db9a7becf42d2454 (diff) | |
Revert "Merge patch series "Add DM firmware reserved memory support""
I had missed that this series was no longer ready to merge as there are
other issues to resolve.
This reverts commit a5ef1849394de475ee3bb9ebfc7629b4dd3b746a, reversing
changes made to 4e7a9bb0885e75853687956002e69875e0ef64e6.
Signed-off-by: Tom Rini <[email protected]>
| -rw-r--r-- | arch/arm/mach-k3/Kconfig | 21 | ||||
| -rw-r--r-- | arch/arm/mach-k3/am62ax/Kconfig | 1 | ||||
| -rw-r--r-- | arch/arm/mach-k3/common_fdt.c | 51 |
3 files changed, 27 insertions, 46 deletions
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig index 1b6678e72b7..a32ed3a9683 100644 --- a/arch/arm/mach-k3/Kconfig +++ b/arch/arm/mach-k3/Kconfig @@ -165,27 +165,6 @@ config K3_DM_FW bootloader, it makes RM and PM services not being available during R5 SPL execution time. -config K3_DM_FW_RESERVED_ADDR - hex "Start address of DM firmware reserved memory region" - depends on !SOC_K3_AM642 && !SOC_K3_AM654 - default 0x9c900000 if SOC_K3_AM62A7 || SOC_K3_AM62P5 - default 0x9db00000 if SOC_K3_AM625 - default 0xa0100000 if SOC_K3_J721E || SOC_K3_J7200 || SOC_K3_J721S2 || SOC_K3_J722S || SOC_K3_J784S4 - help - Start address of the DDR region reserved for DM firmware at runtime. - Used only to fixup the kernel device-tree reserved-memory node. - -config K3_DM_FW_RESERVED_SIZE - hex "Reserved memory size for DM firmware" - depends on !SOC_K3_AM642 && !SOC_K3_AM654 - default 0x1f00000 if SOC_K3_AM62A7 - default 0xc00000 if SOC_K3_AM625 - default 0x1e00000 if TARGET_VERDIN_AM62P_A53 || TARGET_VERDIN_AM62P_R5 - default 0xf00000 if SOC_K3_AM62P5 || SOC_K3_J721E || SOC_K3_J7200 || SOC_K3_J721S2 || SOC_K3_J722S || SOC_K3_J784S4 - help - The runtime memory size reserved for DM firmware. This is the total - DDR span needed for the DM firmware binary. - config K3_X509_SWRV int "SWRV for X509 certificate used for boot images" default 1 diff --git a/arch/arm/mach-k3/am62ax/Kconfig b/arch/arm/mach-k3/am62ax/Kconfig index e7c2a2de9be..6a3969343ec 100644 --- a/arch/arm/mach-k3/am62ax/Kconfig +++ b/arch/arm/mach-k3/am62ax/Kconfig @@ -54,7 +54,6 @@ config TARGET_AM62D2_A53_EVM bool "TI K3 based AM62D2 EVM running on A53" select ARM64 select BINMAN - select OF_SYSTEM_SETUP imply BOARD imply SPL_BOARD imply TI_I2C_BOARD_DETECT diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 18f30e9d052..39cb00c3f43 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c @@ -119,6 +119,7 @@ static int fdt_fixup_reserved_memory(void *blob, const char *name, unsigned int new_size) { int nodeoffset, subnode; + int ret; struct fdt_memory carveout = { .start = new_address, }; @@ -128,27 +129,43 @@ static int fdt_fixup_reserved_memory(void *blob, const char *name, if (nodeoffset < 0) goto add_carveout; - /* Find existing matching subnode and update it in place */ + /* Find existing matching subnode and remove it */ fdt_for_each_subnode(subnode, blob, nodeoffset) { const char *node_name; - u64 reg[2]; + fdt_addr_t addr; + fdt_size_t size; /* Name matching */ node_name = fdt_get_name(blob, subnode, NULL); if (!name) return -EINVAL; if (!strncmp(node_name, name, strlen(name))) { - /* Update the reg property in place */ - reg[0] = cpu_to_fdt64(new_address); - reg[1] = cpu_to_fdt64(new_size); - return fdt_setprop(blob, subnode, "reg", reg, sizeof(reg)); + /* Read out old size first */ + addr = fdtdec_get_addr_size_auto_parent( + blob, nodeoffset, subnode, "reg", 0, &size, + false); + if (addr == FDT_ADDR_T_NONE) + return -EINVAL; + new_size = size; + + /* Delete node */ + ret = fdt_del_node(blob, subnode); + if (ret < 0) + return ret; + + /* Only one matching node */ + break; } } add_carveout: carveout.end = new_address + new_size - 1; - return fdtdec_add_reserved_memory(blob, name, &carveout, NULL, 0, NULL, + ret = fdtdec_add_reserved_memory(blob, name, &carveout, NULL, 0, NULL, FDTDEC_RESERVED_MEMORY_NO_MAP); + if (ret < 0) + return ret; + + return 0; } int fdt_fixup_reserved(void *blob) @@ -160,23 +177,9 @@ int fdt_fixup_reserved(void *blob) if (ret) return ret; - 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; + return fdt_fixup_reserved_memory(blob, "optee", + CONFIG_K3_OPTEE_LOAD_ADDR, + CONFIG_K3_OPTEE_RESERVED_SIZE); } static int fdt_fixup_critical_trips(void *blob, int zoneoffset, int maxc) |
