From: Max Filippov Date: Thu, 28 Jul 2016 00:57:18 +0000 (+0300) Subject: cmd/bdinfo: extract print_bi_boot_params X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=171e53968c638fa7415f02e643332f7c7a6c409d;p=u-boot.git cmd/bdinfo: extract print_bi_boot_params print_bi_boot_params outputs boot parameters structure location. Signed-off-by: Max Filippov Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 1fb66c4917..f0cdaf3022 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); @@ -450,7 +456,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); @@ -485,7 +491,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); @@ -511,7 +517,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);