diff mbox series

[12/36] bdinfo: riscv: Use the generic bd command

Message ID 20200504231732.98778-4-sjg@chromium.org
State Superseded
Headers show
Series Tidy up the 'bd' command. | expand

Commit Message

Simon Glass May 4, 2020, 11:17 p.m. UTC
This arch has none of its own info to show. Move it over to use the
generic do_bdinfo().

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 cmd/bdinfo.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

Comments

Rick Chen May 5, 2020, 1:24 a.m. UTC | #1
> From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Simon Glass
> Sent: Tuesday, May 05, 2020 7:17 AM
> To: U-Boot Mailing List
> Cc: Tom Rini; Simon Glass; Bin Meng; Heiko Schocher
> Subject: [PATCH 12/36] bdinfo: riscv: Use the generic bd command
>
> This arch has none of its own info to show. Move it over to use the generic do_bdinfo().
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>

Reviewed-by: Rick Chen <rick at andestech.com>

>  cmd/bdinfo.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 6a2bbfb348..0e96dd619c 100644
> --- a/cmd/bdinfo.c
> +++ b/cmd/bdinfo.c
> @@ -341,20 +341,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
>
>  #elif defined(CONFIG_RISCV)
>
> -int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{
> -       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);
> -       print_eth_ip_addr();
> -       print_baudrate();
> -       print_cpu_word_size();
> -
> -       return 0;
> -}
> +#define USE_GENERIC
>
>  #elif defined(CONFIG_ARC)
>
> --
> 2.26.2.526.g744177e7f7-goog
Bin Meng May 6, 2020, 8:07 a.m. UTC | #2
On Tue, May 5, 2020 at 7:19 AM Simon Glass <sjg at chromium.org> wrote:
>
> This arch has none of its own info to show. Move it over to use the
> generic do_bdinfo().
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  cmd/bdinfo.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 6a2bbfb348..0e96dd619c 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -341,20 +341,7 @@  static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
 
 #elif defined(CONFIG_RISCV)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-	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);
-	print_eth_ip_addr();
-	print_baudrate();
-	print_cpu_word_size();
-
-	return 0;
-}
+#define USE_GENERIC
 
 #elif defined(CONFIG_ARC)