[U-Boot] [PATCH 1/2] watchdog: Fix SPL builds when watchdog is enabled

Chris Blake chrisrblake93 at gmail.com
Tue Sep 4 01:06:14 UTC 2018


Without this fix, u-boot fails to comple as it tries to load watchdog.h
during an SPL build. This breaks support for things such as the sunxi
arch.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 include/watchdog.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/watchdog.h b/include/watchdog.h
index 14073cf..555f058 100644
--- a/include/watchdog.h
+++ b/include/watchdog.h
@@ -20,7 +20,7 @@
 int init_func_watchdog_reset(void);
 #endif
 
-#if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)
+#if (defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG)) && !defined(CONFIG_SPL_BUILD)
 #define INIT_FUNC_WATCHDOG_INIT	init_func_watchdog_init,
 #define INIT_FUNC_WATCHDOG_RESET	init_func_watchdog_reset,
 #else
@@ -47,7 +47,7 @@ int init_func_watchdog_reset(void);
 	/*
 	 * Maybe a software watchdog?
 	 */
-	#if defined(CONFIG_WATCHDOG)
+	#if defined(CONFIG_WATCHDOG) && !defined(CONFIG_SPL_BUILD)
 		#if defined(__ASSEMBLY__)
 			#define WATCHDOG_RESET bl watchdog_reset
 		#else
-- 
2.7.4



More information about the U-Boot mailing list