Skip to content

Commit

Permalink
bdinfo: Don't print out empty DRAM banks
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
  • Loading branch information
sjg20 authored and lbmeng committed Aug 16, 2016
1 parent c2147e2 commit ddd917b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/bdinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ddd917b

Please sign in to comment.