[PATCH 1/2] arm/airoha: an7581 ignores CFG_MAX_MEM_MAPPED value
    Mikhail Kshevetskiy 
    mikhail.kshevetskiy at iopsys.eu
       
    Wed Oct  8 09:09:02 CEST 2025
    
    
  
This partly fix commit 726404a66c773 ("airoha: rework RAM size handling
to support multiple RAM size")
The function get_effective_memsize() do not see non-global defines
of CFG_MAX_MEM_MAPPED, so the effective memory size will not be changed.
Fix the issue by putting definition of CFG_MAX_MEM_MAPPED to the proper
place.
Fixes: 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size")
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
---
 arch/arm/mach-airoha/an7581/init.c | 2 --
 include/configs/an7581.h           | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-airoha/an7581/init.c b/arch/arm/mach-airoha/an7581/init.c
index 11992027d92..be0ccadf7da 100644
--- a/arch/arm/mach-airoha/an7581/init.c
+++ b/arch/arm/mach-airoha/an7581/init.c
@@ -8,8 +8,6 @@
 #include <asm/global_data.h>
 #include <asm/system.h>
 
-#define CFG_MAX_MEM_MAPPED  SZ_2G
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int print_cpuinfo(void)
diff --git a/include/configs/an7581.h b/include/configs/an7581.h
index 64f04c9d9a5..dfb611d298b 100644
--- a/include/configs/an7581.h
+++ b/include/configs/an7581.h
@@ -15,5 +15,6 @@
 
 /* DRAM */
 #define CFG_SYS_SDRAM_BASE		0x80000000
+#define CFG_MAX_MEM_MAPPED		SZ_2G
 
 #endif
-- 
2.51.0
    
    
More information about the U-Boot
mailing list