[U-Boot] [PATCH 1/2] bdinfo: Don't print out empty DRAM banks
Simon Glass
sjg at chromium.org
Sat Aug 6 05:57:27 CEST 2016
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 at chromium.org>
---
cmd/bdinfo.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 637463e..696c67a 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
}
--
2.8.0.rc3.226.g39d4020
More information about the U-Boot
mailing list