bdinfo: x86: Use the generic bd command
This arch shows 'ethspeed' info but only the freescale drivers use it, so it can be dropped. It also calls print_bi_dram() which is safe to call from any arch since it has an #ifdef inside it. Add this to the generic do_bdinfo() and move x86 over to use it. Put it first since pytests rely on seeing it before memstart in find_ram_base(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
21
cmd/bdinfo.c
21
cmd/bdinfo.c
@@ -331,25 +331,7 @@ static int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||||||
|
|
||||||
#elif defined(CONFIG_X86)
|
#elif defined(CONFIG_X86)
|
||||||
|
|
||||||
int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
#define USE_GENERIC
|
||||||
{
|
|
||||||
bd_t *bd = gd->bd;
|
|
||||||
|
|
||||||
print_bi_boot_params(bd);
|
|
||||||
|
|
||||||
print_bi_dram(bd);
|
|
||||||
|
|
||||||
print_num("relocaddr", gd->relocaddr);
|
|
||||||
print_num("reloc off", gd->reloc_off);
|
|
||||||
#if defined(CONFIG_CMD_NET)
|
|
||||||
print_eth_ip_addr();
|
|
||||||
print_mhz("ethspeed", bd->bi_ethspeed);
|
|
||||||
#endif
|
|
||||||
print_baudrate();
|
|
||||||
print_cpu_word_size();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(CONFIG_SANDBOX)
|
#elif defined(CONFIG_SANDBOX)
|
||||||
|
|
||||||
@@ -428,6 +410,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|||||||
#ifdef USE_GENERIC
|
#ifdef USE_GENERIC
|
||||||
int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||||
{
|
{
|
||||||
|
print_bi_dram(gd->bd);
|
||||||
print_std_bdinfo(gd->bd);
|
print_std_bdinfo(gd->bd);
|
||||||
print_num("relocaddr", gd->relocaddr);
|
print_num("relocaddr", gd->relocaddr);
|
||||||
print_num("reloc off", gd->reloc_off);
|
print_num("reloc off", gd->reloc_off);
|
||||||
|
|||||||
Reference in New Issue
Block a user