summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFrancois Retief <fgretief@spaceteq.co.za>2014-10-27 13:39:03 +0200
committerFrancois Retief <fgretief@spaceteq.co.za>2015-11-13 10:23:32 +0200
commit3f33f6a28b7a823bfa19157353e8b7c78c63f63c (patch)
treec87f76da1eb6aa2b3b5e3cb08ed5f1f4fdb46f97 /common
parent898cc81da3dd5bfa0f77f1791f76d3512b5e4dce (diff)
downloadblackbird-obmc-uboot-3f33f6a28b7a823bfa19157353e8b7c78c63f63c.tar.gz
blackbird-obmc-uboot-3f33f6a28b7a823bfa19157353e8b7c78c63f63c.zip
sparc: Kconfig: Move the CMD_AMBAPP command to Kconfig
Add an initr function in the board_r.c file for the AMBA Plug&Play command. Add a Kconfig entry for the ambapp command and remove all CONFIG_CMD_AMBAPP defines from the board configuration headers. Add a Kconfig entry to display the AMBA Plug&Play information on startup. This option is off by default. Remove relevent define from board configuration headers. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig14
-rw-r--r--common/board_r.c21
2 files changed, 35 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 0388a6c34d..440cb372a1 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -455,6 +455,20 @@ endmenu
menu "Misc commands"
+config CMD_AMBAPP
+ bool "ambapp"
+ depends on LEON3
+ default y
+ help
+ Lists AMBA Plug-n-Play information.
+
+config SYS_AMBAPP_PRINT_ON_STARTUP
+ bool "Show AMBA PnP info on startup"
+ depends on CMD_AMBAPP
+ default n
+ help
+ Show AMBA Plug-n-Play information on startup.
+
config CMD_TIME
bool "time"
help
diff --git a/common/board_r.c b/common/board_r.c
index c4fd3eaf8c..32cb4b767e 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -46,6 +46,9 @@
#include <stdio_dev.h>
#include <trace.h>
#include <watchdog.h>
+#ifdef CONFIG_CMD_AMBAPP
+#include <ambapp.h>
+#endif
#ifdef CONFIG_ADDR_MAP
#include <asm/mmu.h>
#endif
@@ -559,6 +562,18 @@ static int initr_status_led(void)
}
#endif
+#if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
+extern int do_ambapp_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+
+static int initr_ambapp_print(void)
+{
+ puts("AMBA:\n");
+ do_ambapp_print(NULL, 0, 0, NULL);
+
+ return 0;
+}
+#endif
+
#if defined(CONFIG_CMD_SCSI)
static int initr_scsi(void)
{
@@ -851,6 +866,12 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_BOARD_LATE_INIT
board_late_init,
#endif
+#if defined(CONFIG_CMD_AMBAPP)
+ ambapp_init_reloc,
+#if defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
+ initr_ambapp_print,
+#endif
+#endif
#ifdef CONFIG_CMD_SCSI
INIT_FUNC_WATCHDOG_RESET
initr_scsi,
OpenPOWER on IntegriCloud