From patchwork Sun May 10 20:16:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 245446 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 10 May 2020 14:16:28 -0600 Subject: [PATCH v2 05/39] bdinfo: xtensa: Create a generic do_bdinfo for xtensa In-Reply-To: <20200510201702.196031-1-sjg@chromium.org> References: <20200510201702.196031-1-sjg@chromium.org> Message-ID: <20200510141257.v2.5.I6b06858189c2b3de54feeaab0166c56f33140318@changeid> 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 Reviewed-by: Bin Meng --- Changes in v2: None cmd/bdinfo.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 9edcf8d74e..9247180a29 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -474,14 +474,20 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #elif defined(CONFIG_XTENSA) -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +#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(cmd_tbl_t *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 /* -------------------------------------------------------------------- */