summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-08-05 21:57:27 -0600
committerBin Meng <bmeng.cn@gmail.com>2016-08-16 11:44:09 +0800
commitddd917b8fa32c3ef5e2609282d7e5d8f299f1872 (patch)
tree3018026cf73d6855fafbdbc4d62951f65a65cac3 /cmd
parentc2147e26d99652e2f9691ae852af823ec49fdbeb (diff)
downloadu-boot-ddd917b8fa32c3ef5e2609282d7e5d8f299f1872.tar.gz
bdinfo: Don't print out empty DRAM banks
There is no sense in printing out DRAM banks of size 0 since this means they are empty. Skip them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bdinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index e0bd15d54b..30bc15862d 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -98,9 +98,11 @@ static inline void print_bi_dram(const bd_t *bd)
int i;
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);
+ if (bd->bi_dram[i].size) {
+ print_num("DRAM bank", i);
+ print_num("-> start", bd->bi_dram[i].start);
+ print_num("-> size", bd->bi_dram[i].size);
+ }
}
#endif
}