diff mbox series

[06/36] bdinfo: nios2: Use the generic bd command

Message ID 20200504171638.6.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
Nios2 currently has some code to output SRAM information which is behind
an #ifdef. No nios2 boards define this option, so the code can be removed.

Move Nios2 over to use the generic function.

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

 cmd/bdinfo.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 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:
>
> Nios2 currently has some code to output SRAM information which is behind
> an #ifdef. No nios2 boards define this option, so the code can be removed.
>
> Move Nios2 over to use the generic function.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  cmd/bdinfo.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 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 6ccbd2f50f..405a915861 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -220,24 +220,7 @@  int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 #elif defined(CONFIG_NIOS2)
 
-int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-	bd_t *bd = gd->bd;
-
-	print_bi_dram(bd);
-	print_bi_flash(bd);
-
-#if defined(CONFIG_SYS_SRAM_BASE)
-	print_num ("sram start",	(ulong)bd->bi_sramstart);
-	print_num ("sram size",		(ulong)bd->bi_sramsize);
-#endif
-
-	print_eth_ip_addr();
-	print_baudrate();
-	print_cpu_word_size();
-
-	return 0;
-}
+#define USE_GENERIC
 
 #elif defined(CONFIG_MICROBLAZE)