summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2020-08-12 13:02:39 +0200
committerStefan Roese <sr@denx.de>2020-08-26 09:19:28 +0200
commitf120aa7522fafa7606ae28693cc6f29be12e4887 (patch)
treecc4c68341591112ed172b4f2cfca851f5936fb6d
parent4963f63fe61f15329d77472a762b1d8bf754d24b (diff)
downloadu-boot-f120aa7522fafa7606ae28693cc6f29be12e4887.tar.gz
u-boot-f120aa7522fafa7606ae28693cc6f29be12e4887.tar.xz
u-boot-f120aa7522fafa7606ae28693cc6f29be12e4887.zip
board_f: Add default values for bi_dram[] in dram_init_banksize()
Remove the bi_memstart / bi_memsize assignment in setup_bdinfo() and make sure, that bd_dram[] is always configured in the weak default implementation of dram_init_banksize(), when CONFIG_SYS_SDRAM_BASE is not set. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Ovidiu Panait <ovidiu.panait@windriver.com>
-rw-r--r--common/board_f.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/common/board_f.c b/common/board_f.c
index ed37e3acaa..62473abf79 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -237,10 +237,8 @@ static int show_dram_config(void)
__weak int dram_init_banksize(void)
{
-#if defined(CONFIG_SYS_SDRAM_BASE)
- gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].start = gd->ram_base;
gd->bd->bi_dram[0].size = get_effective_memsize();
-#endif
return 0;
}
@@ -598,9 +596,6 @@ int setup_bdinfo(void)
{
struct bd_info *bd = gd->bd;
- bd->bi_memstart = gd->ram_base; /* start of memory */
- bd->bi_memsize = gd->ram_size; /* size in bytes */
-
if (IS_ENABLED(CONFIG_SYS_HAS_SRAM)) {
bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; /* start of SRAM */
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */