summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-10-15 14:19:23 -0600
committerTom Rini <[email protected]>2025-10-15 15:08:27 -0600
commit2ba64e303b2706e5c42a6bf982326d632342ca66 (patch)
tree9be1ebe8e4c47373e687d84a6f22e9d39e6b6fab
parentf21920f7e7952b3f9657bd1674085211925e52f9 (diff)
parentce175fa9f0e83c5df3ba7131bc4359fee3697354 (diff)
Merge patch series "fix an7581 panic caused by attempt to support multiple RAM size"
Mikhail Kshevetskiy <[email protected]> says: The commit 726404a66c773 ("airoha: rework RAM size handling to support multiple RAM size") is not good enougth. It results in pacnic during determining of memory size amount. This patch series partly fix and partly revert the above commit. Unfortunately for now we have no a good way to determine the an7581 memory size. Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--arch/arm/mach-airoha/an7581/init.c12
-rw-r--r--include/configs/an7581.h1
2 files changed, 2 insertions, 11 deletions
diff --git a/arch/arm/mach-airoha/an7581/init.c b/arch/arm/mach-airoha/an7581/init.c
index 11992027d92..ab32706a79d 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)
@@ -20,15 +18,7 @@ int print_cpuinfo(void)
int dram_init(void)
{
- int ret;
-
- ret = fdtdec_setup_mem_size_base();
- if (ret)
- return ret;
-
- gd->ram_size = get_ram_size((void *)gd->ram_base, SZ_8G);
-
- return 0;
+ return fdtdec_setup_mem_size_base();
}
int dram_init_banksize(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