summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2018-07-16 15:56:10 +0530
committerMichal Simek <michal.simek@xilinx.com>2018-07-19 10:49:56 +0200
commit1473b12ad0b33771ded1b2fd6b73d2cd6d73b8f7 (patch)
tree9fa0de2e820f89ffa33941b069e5eb96865b0b8c /common/board_f.c
parentf4da871a7f09540557792ea5da688c54790add7d (diff)
lib: fdtdec: Update ram_base to store ram start adddress
This patch updates the ram_base to store the start address of the first bank DRAM and the use this ram_base to calculate ram_top properly. This patch fixes the erroneous calculation of ram_top incase of non zero ram start address. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/board_f.c b/common/board_f.c
index e943347ce3..88d770071c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -281,9 +281,9 @@ static int setup_dest_addr(void)
gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE;
#endif
#ifdef CONFIG_SYS_SDRAM_BASE
- gd->ram_top = CONFIG_SYS_SDRAM_BASE;
+ gd->ram_base = CONFIG_SYS_SDRAM_BASE;
#endif
- gd->ram_top += get_effective_memsize();
+ gd->ram_top = gd->ram_base + get_effective_memsize();
gd->ram_top = board_get_usable_ram_top(gd->mon_len);
gd->relocaddr = gd->ram_top;
debug("Ram top: %08lX\n", (ulong)gd->ram_top);