diff mbox

[U-Boot,RFC,v1,1/9] sparc: Add initr function for CMD_AMBAPP command

Message ID 1414572787-17538-2-git-send-email-fgretief@spaceteq.co.za
State RFC
Delegated to: Daniel Hellstrom
Headers show

Commit Message

Francois Retief Oct. 29, 2014, 8:52 a.m. UTC
Add an initr function in board_r.c file for the AMBA PnP command.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
---

 common/board_r.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

--
1.9.3
diff mbox

Patch

diff --git a/common/board_r.c b/common/board_r.c
index 7c33900..6d6c7e8 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -45,6 +45,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
@@ -566,6 +569,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)
 {
@@ -857,6 +872,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,