diff mbox

[U-Boot,v2,7/7] cmd/bdinfo: extract print_std_bdinfo

Message ID 1469667444-4686-8-git-send-email-jcmvbkbc@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Max Filippov July 28, 2016, 12:57 a.m. UTC
print_std_bdinfo outputs typical set of board information entries:
boot params location, memory and flash addresses and sizes, network
interfaces information and configured serial baud rate.

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

Comments

Tom Rini July 29, 2016, 1:29 p.m. UTC | #1
On Thu, Jul 28, 2016 at 03:57:24AM +0300, Max Filippov wrote:

> print_std_bdinfo outputs typical set of board information entries:
> boot params location, memory and flash addresses and sizes, network
> interfaces information and configured serial baud rate.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass Aug. 1, 2016, 1:03 a.m. UTC | #2
On 27 July 2016 at 18:57, Max Filippov <jcmvbkbc@gmail.com> wrote:
> print_std_bdinfo outputs typical set of board information entries:
> boot params location, memory and flash addresses and sizes, network
> interfaces information and configured serial baud rate.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  cmd/bdinfo.c | 32 ++++++++++++--------------------
>  1 file changed, 12 insertions(+), 20 deletions(-)

Nice!

Reviewed-by: Simon Glass <sjg@chromium.org>
Max Filippov Aug. 1, 2016, 1:10 a.m. UTC | #3
Tom, Simon,

On Mon, Aug 1, 2016 at 4:03 AM, Simon Glass <sjg@chromium.org> wrote:
> On 27 July 2016 at 18:57, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> print_std_bdinfo outputs typical set of board information entries:
>> boot params location, memory and flash addresses and sizes, network
>> interfaces information and configured serial baud rate.
>>
>> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
>> ---
>>  cmd/bdinfo.c | 32 ++++++++++++--------------------
>>  1 file changed, 12 insertions(+), 20 deletions(-)
>
> Nice!
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Thank you for reviews. Do I need to post pull request or will anybody
take this series?
Tom Rini Aug. 6, 2016, 12:59 a.m. UTC | #4
On Thu, Jul 28, 2016 at 03:57:24AM +0300, Max Filippov wrote:

> print_std_bdinfo outputs typical set of board information entries:
> boot params location, memory and flash addresses and sizes, network
> interfaces information and configured serial baud rate.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 403ed3e..e1128cb 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -157,6 +157,15 @@  static inline void print_baudrate(void)
 #endif
 }
 
+static inline void print_std_bdinfo(const bd_t *bd)
+{
+	print_bi_boot_params(bd);
+	print_bi_mem(bd);
+	print_bi_flash(bd);
+	print_eth_ip_addr();
+	print_baudrate();
+}
+
 #if defined(CONFIG_PPC)
 void __weak board_detail(void)
 {
@@ -340,11 +349,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_bi_boot_params(bd);
-	print_bi_mem(bd);
-	print_bi_flash(bd);
-	print_eth_ip_addr();
-	print_baudrate();
+	print_std_bdinfo(bd);
 
 	return 0;
 }
@@ -353,13 +358,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 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_bi_mem(bd);
-	print_bi_flash(bd);
-	print_eth_ip_addr();
-	print_baudrate();
+	print_std_bdinfo(gd->bd);
 	print_num("relocaddr", gd->relocaddr);
 	print_num("reloc off", gd->reloc_off);
 
@@ -370,14 +369,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 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_bi_mem(bd);
-	print_bi_flash(bd);
-	print_eth_ip_addr();
-	print_baudrate();
-
+	print_std_bdinfo(gd->bd);
 	return 0;
 }