diff mbox series

[05/36] bdinfo: mips: Use the generic bd command

Message ID 20200504171638.5.I5c19e9c00f5168dc3f465b066ad4fc864a9cf0de@changeid
State Superseded
Headers show
Series Tidy up the 'bd' command. | expand

Commit Message

Simon Glass May 4, 2020, 11:17 p.m. UTC
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 at chromium.org>
---

 cmd/bdinfo.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Bin Meng May 6, 2020, 8:07 a.m. UTC | #1
On Tue, May 5, 2020 at 7:19 AM Simon Glass <sjg at chromium.org> wrote:
>
> 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 at chromium.org>
> ---
>
>  cmd/bdinfo.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Daniel Schwierzeck May 6, 2020, 3:29 p.m. UTC | #2
Am 05.05.20 um 01:17 schrieb Simon Glass:
> 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 at chromium.org>
> ---
> 
>  cmd/bdinfo.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>

> 
> diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> index 9247180a29..6ccbd2f50f 100644
> --- a/cmd/bdinfo.c
> +++ b/cmd/bdinfo.c
> @@ -299,15 +299,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  
>  #elif defined(CONFIG_MIPS)
>  
> -int do_bdinfo(cmd_tbl_t *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)
>  
> @@ -485,6 +477,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  int do_bdinfo(cmd_tbl_t *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;
>  }
>
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 9247180a29..6ccbd2f50f 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -299,15 +299,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_MIPS)
 
-int do_bdinfo(cmd_tbl_t *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)
 
@@ -485,6 +477,9 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 int do_bdinfo(cmd_tbl_t *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;
 }