dram_init_banksize() splits memory above 2 GiB into a second DRAM bank and fills gd->dram[1]. With CONFIG_NR_DRAM_BANKS set to 1, gd->dram[1] is out of bounds and the second bank is not handled.
Set CONFIG_NR_DRAM_BANKS to 2 to match the board memory layout. Signed-off-by: Zhengping Zhang <[email protected]> --- configs/an7581_evb_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index 07569fa0a4e..b966009c0fb 100644 --- a/configs/an7581_evb_defconfig +++ b/configs/an7581_evb_defconfig @@ -4,7 +4,7 @@ CONFIG_ARCH_AIROHA=y CONFIG_TARGET_AN7581=y CONFIG_TEXT_BASE=0x81E00000 CONFIG_SYS_MALLOC_F_LEN=0x4000 -CONFIG_NR_DRAM_BANKS=1 +CONFIG_NR_DRAM_BANKS=2 CONFIG_ENV_SIZE=0x4000 CONFIG_ENV_OFFSET=0x7c000 CONFIG_DM_GPIO=y -- 2.43.0
