[PATCH] watchdog: Fix SPL build with watchdog disabled in asm files
Pali Rohár
pali at kernel.org
Sat Jun 4 15:06:45 CEST 2022
PING?
On Thursday 28 April 2022 13:33:09 Pali Rohár wrote:
> 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 at kernel.org>
> ---
> include/watchdog.h | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/include/watchdog.h b/include/watchdog.h
> index 14fa5fda259e..813cc8f2a5d3 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) && \
> --
> 2.20.1
>
More information about the U-Boot
mailing list