summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-10-27 02:21:06 (GMT)
committerThomas Chou <thomas@wytron.com.tw>2015-11-06 01:14:11 (GMT)
commit744b57b8a688342cc98b4179ab19151c46f32506 (patch)
treeda1511b12e1709c3734f52914579dc8606efa3a3 /common
parent2de4823dc0424923a6d6070a7378a7bf6ee67556 (diff)
downloadu-boot-744b57b8a688342cc98b4179ab19151c46f32506.tar.xz
nios2: use dram bank in board info
Use dram bank in board info, so that it displays correct memory values in bdinfo command. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bdinfo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index ed3b935..adda55a 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -157,10 +157,15 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
+ int i;
bd_t *bd = gd->bd;
- print_num("mem start", (ulong)bd->bi_memstart);
- print_lnum("mem size", (u64)bd->bi_memsize);
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
+ print_num("DRAM bank", i);
+ print_num("-> start", bd->bi_dram[i].start);
+ print_num("-> size", bd->bi_dram[i].size);
+ }
+
print_num("flash start", (ulong)bd->bi_flashstart);
print_num("flash size", (ulong)bd->bi_flashsize);
print_num("flash offset", (ulong)bd->bi_flashoffset);