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 <chrisrblak...@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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to