From: Chris Blake Date: Mon, 3 Sep 2018 20:06:14 -0500 Subject: [U-Boot] [PATCH 1/2] watchdog: Fix SPL builds when watchdog is enabled In-Reply-To: <1536023175-10682-1-git-send-email-chrisrblake93@gmail.com> References: <1536023175-10682-1-git-send-email-chrisrblake93@gmail.com> Message-ID: <1536023175-10682-2-git-send-email-chrisrblake93@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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