[U-Boot] [PATCH 6/8] microblaze: Do not handle watchdog and gpio in SPL

Michal Simek michal.simek at xilinx.com
Fri Dec 11 12:49:03 CET 2015


watchdog and gpio are not validated for SPL that's why do not use them.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 board/xilinx/microblaze-generic/microblaze-generic.c | 3 ++-
 include/configs/microblaze-generic.h                 | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index bc4d6414df2d..dfa629322223 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -69,6 +69,7 @@ int dram_init(void)
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
+#ifndef CONFIG_SPL_BUILD
 #ifdef CONFIG_XILINX_GPIO
 	if (reset_pin != -1)
 		gpio_direction_output(reset_pin, 1);
@@ -77,7 +78,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #ifdef CONFIG_XILINX_TB_WATCHDOG
 	hw_watchdog_disable();
 #endif
-
+#endif
 	puts ("Reseting board\n");
 	__asm__ __volatile__ ("	mts rmsr, r0;" \
 				"bra r0");
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 8db6b551ceda..f93861d770ee 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -97,8 +97,10 @@
 #if defined(XILINX_WATCHDOG_BASEADDR) && defined(XILINX_WATCHDOG_IRQ)
 # define CONFIG_WATCHDOG_BASEADDR	XILINX_WATCHDOG_BASEADDR
 # define CONFIG_WATCHDOG_IRQ		XILINX_WATCHDOG_IRQ
-# define CONFIG_HW_WATCHDOG
-# define CONFIG_XILINX_TB_WATCHDOG
+# ifndef CONFIG_SPL_BUILD
+#  define CONFIG_HW_WATCHDOG
+#  define CONFIG_XILINX_TB_WATCHDOG
+# endif
 #endif
 
 #if !defined(CONFIG_OF_CONTROL) || \
-- 
1.9.1



More information about the U-Boot mailing list