diff options
author | Pali Rohár <pali@kernel.org> | 2022-04-28 13:33:09 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-06-07 08:45:35 +0200 |
commit | 06ceff70bf040536163d5010c7560e5846f063c6 (patch) | |
tree | 806cf659bc481b5bf0bde3c8885c5f1ea8d27dee /include/watchdog.h | |
parent | 8f527342db4160a1f030de6fe4a1591787cce65a (diff) | |
download | u-boot-06ceff70bf040536163d5010c7560e5846f063c6.tar.gz |
watchdog: Fix SPL build with watchdog disabled in asm files
Allow to compile assembler files in SPL build which calls WATCHDOG_RESET
function when watchdog is disabled in SPL and enabled in U-Boot proper.
This issue was fixed in past by commit 7fbd42f5afc4 ("watchdog: Handle SPL
build with watchdog disabled") for C source files, but not for assembler
source files.
Currently the only assembler source file which calls WATCHDOG_RESET is
arch/powerpc/lib/ticks.S, so this patch affects and fixes powerpc SPL
builds.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/watchdog.h')
-rw-r--r-- | include/watchdog.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/watchdog.h b/include/watchdog.h index 14fa5fda25..813cc8f2a5 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -49,7 +49,13 @@ int init_func_watchdog_reset(void); */ #if defined(CONFIG_WATCHDOG) #if defined(__ASSEMBLY__) - #define WATCHDOG_RESET bl watchdog_reset + /* Don't require the watchdog to be enabled in SPL */ + #if defined(CONFIG_SPL_BUILD) && \ + !defined(CONFIG_SPL_WATCHDOG) + #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/ + #else + #define WATCHDOG_RESET bl watchdog_reset + #endif #else /* Don't require the watchdog to be enabled in SPL */ #if defined(CONFIG_SPL_BUILD) && \ |