Skip to contentSkip to conversation

bdinfo: Don't print out empty DRAM banks

PATCH New Simon Glass 3 participants 7 messages Aug 6, 2016 – Aug 9, 2016

lore
Share & tools
lore
#0 lore raw

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.

---

 cmd/bdinfo.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
cmd/bdinfo.c +5 -3
index 637463e..696c67a 100644
@@ -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
 }
Signature · 1 line
2.8.0.rc3.226.g39d4020
#1 lore raw

PATCH 2/2 x86: bdinfo: Drop meaningless values

These are not useful on x86 so do not print them.

---

 cmd/bdinfo.c | 10 ----------
 1 file changed, 10 deletions(-)
cmd/bdinfo.c +0 -10
index 696c67a..1be1cac 100644
@@ -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);
 
Signature · 1 line
2.8.0.rc3.226.g39d4020
#4 lore raw

PATCH 1/2 bdinfo: Don't print out empty DRAM banks

In reply to Simon Glass
Quoted 4 lines · Simon Glass

There is no sense in printing out DRAM banks of size 0 since this means they are empty. Skip them.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160806/44e8a539/attachment.sig>
#6 lore raw

PATCH 1/2 bdinfo: Don't print out empty DRAM banks

Quoted 4 lines · Bin Meng
Quoted 3 lines · Simon Glass

There is no sense in printing out DRAM banks of size 0 since this means they are empty. Skip them.

Quoted 8 lines
Quoted 6 lines

---

 cmd/bdinfo.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

applied to u-boot-x86, thanks!