public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] cmd/bdinfo: extract print_bi_boot_params
Date: Wed, 27 Jul 2016 08:27:30 +0300	[thread overview]
Message-ID: <1469597262-19671-2-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1469597262-19671-1-git-send-email-jcmvbkbc@gmail.com>

print_bi_boot_params outputs boot parameters structure location.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 cmd/bdinfo.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index f2435ab..60aaafb 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -69,6 +69,12 @@ static void print_mhz(const char *name, unsigned long hz)
 	printf("%-12s= %6s MHz\n", name, strmhz(buf, hz));
 }
 
+
+static inline void print_bi_boot_params(const bd_t *bd)
+{
+	print_num("boot_params",	(ulong)bd->bi_boot_params);
+}
+
 #if defined(CONFIG_PPC)
 void __weak board_detail(void)
 {
@@ -311,7 +317,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	print_mhz("CCLK",	bd->bi_cclk);
 	print_mhz("SCLK",	bd->bi_sclk);
 
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 	print_num("memstart",		(ulong)bd->bi_memstart);
 	print_lnum("memsize",		(u64)bd->bi_memsize);
 	print_num("flashstart",		(ulong)bd->bi_flashstart);
@@ -331,7 +337,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	bd_t *bd = gd->bd;
 
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 	print_num("memstart",		(ulong)bd->bi_memstart);
 	print_lnum("memsize",		(u64)bd->bi_memsize);
 	print_num("flashstart",		(ulong)bd->bi_flashstart);
@@ -353,7 +359,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	bd_t *bd = gd->bd;
 
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 	print_num("memstart",		(ulong)bd->bi_dram[0].start);
 	print_lnum("memsize",		(u64)bd->bi_dram[0].size);
 	print_num("flashstart",		(ulong)bd->bi_flashstart);
@@ -376,7 +382,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 	bd_t *bd = gd->bd;
 
 	print_num("arch_number",	bd->bi_arch_number);
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
 		print_num("DRAM bank",	i);
@@ -445,7 +451,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	int i;
 	bd_t *bd = gd->bd;
 
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	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);
@@ -480,7 +486,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	int i;
 	bd_t *bd = gd->bd;
 
-	print_num("boot_params", (ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
 		print_num("DRAM bank", i);
@@ -506,7 +512,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	bd_t *bd = gd->bd;
 
 	print_num("arch_number",	bd->bi_arch_number);
-	print_num("boot_params",	(ulong)bd->bi_boot_params);
+	print_bi_boot_params(bd);
 
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
 		print_num("DRAM bank",	i);
-- 
2.1.4

  reply	other threads:[~2016-07-27  5:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  5:27 [U-Boot] [PATCH 0/7] cmd/bdinfo: extract common parts and reuse them Max Filippov
2016-07-27  5:27 ` Max Filippov [this message]
2016-07-27  5:27 ` [U-Boot] [PATCH 1/6] cmd/bdinfo: extract print_bi_mem Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 2/6] cmd/bdinfo: extract print_bi_dram Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 2/7] cmd/bdinfo: extract print_bi_mem Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 3/7] cmd/bdinfo: extract print_bi_dram Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 3/6] cmd/bdinfo: extract print_bi_flash Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 4/7] " Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 4/6] cmd/bdinfo: extract print_eth_ip_addr Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 5/6] cmd/bdinfo: extract print_baudrate Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 5/7] cmd/bdinfo: extract print_eth_ip_addr Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 6/7] cmd/bdinfo: extract print_baudrate Max Filippov
2016-07-27  5:27 ` [U-Boot] [PATCH 6/6] cmd/bdinfo: extract print_std_bdinfo Max Filippov
2016-07-27  5:29 ` [U-Boot] [PATCH 0/7] cmd/bdinfo: extract common parts and reuse them Max Filippov
  -- strict thread matches above, loose matches on Subject: below --
2016-07-27  5:31 Max Filippov
2016-07-27  5:31 ` [U-Boot] [PATCH 1/7] cmd/bdinfo: extract print_bi_boot_params Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469597262-19671-2-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox