[U-Boot] [PATCH 1/7] cmd/bdinfo: extract print_bi_boot_params
Max Filippov
jcmvbkbc at gmail.com
Wed Jul 27 07:31:45 CEST 2016
print_bi_boot_params outputs boot parameters structure location.
Signed-off-by: Max Filippov <jcmvbkbc at 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
More information about the U-Boot
mailing list