summaryrefslogtreecommitdiff
path: root/cmd/bdinfo.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 14:16:28 -0600
committerTom Rini <trini@konsulko.com>2020-06-25 13:24:10 -0400
commit1af9756db8f04ea5c3243929a157058d32e293bf (patch)
tree3583dab8d01a87f48df332cae4d0dd158839432a /cmd/bdinfo.c
parent4ac06d352592b79b2a07747073111c12c7ef9663 (diff)
downloadu-boot-1af9756db8f04ea5c3243929a157058d32e293bf.tar.gz
u-boot-1af9756db8f04ea5c3243929a157058d32e293bf.tar.bz2
u-boot-1af9756db8f04ea5c3243929a157058d32e293bf.zip
bdinfo: xtensa: Create a generic do_bdinfo for xtensa
This arch uses only the generic function. It would be nice if all the archs did the same. As a first step, create a new generic function for the 'bd' command and make xtensa use it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'cmd/bdinfo.c')
-rw-r--r--cmd/bdinfo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index dba552b03f..83fea50ac1 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -476,14 +476,20 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
#elif defined(CONFIG_XTENSA)
+#define USE_GENERIC
+
+#else
+ #error "a case for this architecture does not exist!"
+#endif
+
+/* Temporary check for archs that use generic bdinfo. Eventually all will */
+#ifdef USE_GENERIC
int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
print_std_bdinfo(gd->bd);
+
return 0;
}
-
-#else
- #error "a case for this architecture does not exist!"
#endif
/* -------------------------------------------------------------------- */