summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Kconfig14
-rw-r--r--common/board_r.c21
-rw-r--r--configs/grsim_defconfig1
-rw-r--r--include/config_cmd_all.h1
-rw-r--r--include/configs/gr_cpci_ax2000.h4
-rw-r--r--include/configs/gr_ep2s60.h4
-rw-r--r--include/configs/gr_xc3s_1500.h4
-rw-r--r--include/configs/grsim.h4
8 files changed, 36 insertions, 17 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 0388a6c34d4..440cb372a13 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 c4fd3eaf8cc..32cb4b767ec 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,
diff --git a/configs/grsim_defconfig b/configs/grsim_defconfig
index b0295f2f0c3..a5ea7ab8d83 100644
--- a/configs/grsim_defconfig
+++ b/configs/grsim_defconfig
@@ -13,3 +13,4 @@ CONFIG_SYS_TEXT_BASE=0x00000000
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
+CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP=y
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index 8832552f318..424721b7e74 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -13,7 +13,6 @@
* Alphabetical list of all possible commands.
*/
-#define CONFIG_CMD_AMBAPP /* AMBA Plug & Play Bus print utility */
#define CONFIG_CMD_ASKENV /* ask for env variable */
#define CONFIG_CMD_BEDBUG /* Include BedBug Debugger */
#define CONFIG_CMD_BMP /* BMP support */
diff --git a/include/configs/gr_cpci_ax2000.h b/include/configs/gr_cpci_ax2000.h
index 060f116df25..846178793da 100644
--- a/include/configs/gr_cpci_ax2000.h
+++ b/include/configs/gr_cpci_ax2000.h
@@ -60,7 +60,6 @@
* Supported commands
*/
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_AMBAPP
#define CONFIG_CMD_PING
#define CONFIG_CMD_DIAG
#define CONFIG_CMD_IRQ
@@ -311,9 +310,6 @@
/***** Gaisler GRLIB IP-Cores Config ********/
-/* AMBA Plug & Play info display on startup */
-/*#define CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP*/
-
#define CONFIG_SYS_GRLIB_SDRAM 0
/* See, GRLIB Docs (grip.pdf) on how to set up
diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h
index 005f7796fb5..2f953aeb9af 100644
--- a/include/configs/gr_ep2s60.h
+++ b/include/configs/gr_ep2s60.h
@@ -54,7 +54,6 @@
* Supported commands
*/
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_AMBAPP
#define CONFIG_CMD_PING
#define CONFIG_CMD_DIAG
#define CONFIG_CMD_IRQ
@@ -288,9 +287,6 @@
/***** Gaisler GRLIB IP-Cores Config ********/
-/* AMBA Plug & Play info display on startup */
-/*#define CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP*/
-
#define CONFIG_SYS_GRLIB_SDRAM 0
/* See, GRLIB Docs (grip.pdf) on how to set up
diff --git a/include/configs/gr_xc3s_1500.h b/include/configs/gr_xc3s_1500.h
index 3523cde3c7f..428b5324eef 100644
--- a/include/configs/gr_xc3s_1500.h
+++ b/include/configs/gr_xc3s_1500.h
@@ -41,7 +41,6 @@
* Supported commands
*/
#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_AMBAPP
#define CONFIG_CMD_PING
#define CONFIG_CMD_DIAG
#define CONFIG_CMD_IRQ
@@ -251,9 +250,6 @@
/***** Gaisler GRLIB IP-Cores Config ********/
-/* AMBA Plug & Play info display on startup */
-/*#define CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP*/
-
#define CONFIG_SYS_GRLIB_SDRAM 0
/* See, GRLIB Docs (grip.pdf) on how to set up
diff --git a/include/configs/grsim.h b/include/configs/grsim.h
index a5387852c24..e07b81641a6 100644
--- a/include/configs/grsim.h
+++ b/include/configs/grsim.h
@@ -51,7 +51,6 @@
/*
* Supported commands
*/
-#define CONFIG_CMD_AMBAPP /* AMBA Plyg&Play information */
#define CONFIG_CMD_DIAG
#define CONFIG_CMD_FPGA_LOADMK
#define CONFIG_CMD_IRQ
@@ -262,9 +261,6 @@
/***** Gaisler GRLIB IP-Cores Config ********/
-/* AMBA Plug & Play info display on startup */
-/*#define CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP*/
-
#define CONFIG_SYS_GRLIB_SDRAM 0
#define CONFIG_SYS_GRLIB_MEMCFG1 (0x000000ff | (1<<11))