bdinfo: mips: Use the generic bd command
authorSimon Glass <sjg@chromium.org>
Sun, 10 May 2020 20:16:29 +0000 (14:16 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 25 Jun 2020 17:24:11 +0000 (13:24 -0400)
MIPS currently has a few extra things which are generally useful. Add them
to the generic function and move MIPS over to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
cmd/bdinfo.c

index 83fea50ac1744b22665dbcdf7a875f8b0c3c6895..761bcc18621b823b783343ce8d508a1ff85ae9fe 100644 (file)
@@ -301,15 +301,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 
 #elif defined(CONFIG_MIPS)
 
-int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
-{
-       print_std_bdinfo(gd->bd);
-       print_num("relocaddr", gd->relocaddr);
-       print_num("reloc off", gd->reloc_off);
-       print_cpu_word_size();
-
-       return 0;
-}
+#define USE_GENERIC
 
 #elif defined(CONFIG_ARM)
 
@@ -487,6 +479,9 @@ 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_std_bdinfo(gd->bd);
+       print_num("relocaddr", gd->relocaddr);
+       print_num("reloc off", gd->reloc_off);
+       print_cpu_word_size();
 
        return 0;
 }