[U-Boot] [PATCH 1/2] 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 ---
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 }

These are not useful on x86 so do not print them.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/bdinfo.c | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 696c67a..1be1cac 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -446,16 +446,6 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) bd_t *bd = gd->bd;
print_bi_boot_params(bd); - print_num("bi_memstart", bd->bi_memstart); - print_num("bi_memsize", bd->bi_memsize); - print_num("bi_flashstart", bd->bi_flashstart); - print_num("bi_flashsize", bd->bi_flashsize); - print_num("bi_flashoffset", bd->bi_flashoffset); - print_num("bi_sramstart", bd->bi_sramstart); - print_num("bi_sramsize", bd->bi_sramsize); - print_num("bi_bootflags", bd->bi_bootflags); - print_mhz("cpufreq", bd->bi_intfreq); - print_mhz("busfreq", bd->bi_busfreq);
print_bi_dram(bd);

On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass sjg@chromium.org wrote:
These are not useful on x86 so do not print them.
Signed-off-by: Simon Glass sjg@chromium.org
cmd/bdinfo.c | 10 ---------- 1 file changed, 10 deletions(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com

On Sun, Aug 7, 2016 at 2:46 PM, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass sjg@chromium.org wrote:
These are not useful on x86 so do not print them.
Signed-off-by: Simon Glass sjg@chromium.org
cmd/bdinfo.c | 10 ---------- 1 file changed, 10 deletions(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com
applied to u-boot-x86, thanks!

On Fri, Aug 05, 2016 at 09:57:27PM -0600, Simon Glass wrote:
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

On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass sjg@chromium.org wrote:
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
cmd/bdinfo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com

On Sun, Aug 7, 2016 at 2:41 PM, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Aug 6, 2016 at 11:57 AM, Simon Glass sjg@chromium.org wrote:
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
cmd/bdinfo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com
applied to u-boot-x86, thanks!
participants (3)
-
Bin Meng
-
Simon Glass
-
Tom Rini