summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnshul Dalal <[email protected]>2025-10-31 21:47:31 +0530
committerTom Rini <[email protected]>2025-11-04 10:39:06 -0600
commit45b7857d3b5b4cb12a5cc0a121bc8ac4b57427fa (patch)
treec6f93b2ea738193243f1149bdae8934129843944
parente5b9d92d408d181d5983f352792e1549f03c7e46 (diff)
arm: armv8: mmu: fix mem_map_from_dram_banks
mem_map_from_dram_banks calls fdtdec_setup_memory_banksize to setup the dram banks though that is expected to be done by dram_init_banksize as part of board_r sequence. This has the side effect of modifying gd->bd->bi_dram as well, therefore this patch removes the call and updates spl_enable_cache for K3 to call dram_init_banksize. Signed-off-by: Anshul Dalal <[email protected]> Reported-by: Francesco Dolcini <[email protected]> Closes: https://lore.kernel.org/u-boot/20251027165225.GA71553@francesco-nb/ Fixes: fe2647f2a0d4 ("arm: armv8: mmu: add mem_map_from_dram_banks") Tested-by: Emanuele Ghidoli <[email protected]>
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c6
-rw-r--r--arch/arm/mach-k3/common.c1
2 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 672ec16d483..0309da6d397 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -61,12 +61,6 @@ static int get_effective_el(void)
int mem_map_from_dram_banks(unsigned int index, unsigned int len, u64 attrs)
{
unsigned int i;
- int ret = fdtdec_setup_memory_banksize();
-
- if (ret) {
- log_err("%s: Failed to setup dram banks\n", __func__);
- return ret;
- }
if (index + CONFIG_NR_DRAM_BANKS >= len) {
log_err("%s: Provided mem_map array has insufficient size for DRAM entries\n",
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 04a0f232d84..3f51b9614d9 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -311,6 +311,7 @@ void spl_enable_cache(void)
int ret = 0;
dram_init();
+ dram_init_banksize();
/* reserve TLB table */
gd->arch.tlb_size = PGTABLE_SIZE;