diff options
author | Stefan Roese <sr@denx.de> | 2022-09-02 14:10:47 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2022-09-18 10:26:39 +0200 |
commit | ff3fdfe89b29a4561afe4756b9c7df886e70e0d7 (patch) | |
tree | 1e7f2304f469a27534b06a560441b3bdd971aedd /include/watchdog.h | |
parent | 29caf9305b6fafe8f6d6b18fa1f825dff8686e61 (diff) | |
download | u-boot-ff3fdfe89b29a4561afe4756b9c7df886e70e0d7.tar.gz |
watchdog: Get rid of ASSEMBLY hacks
Only one occurance of WATCHDOG_RESET is left in one assembler file.
This patch changes this occurance to a direct call to watchdog_reset
and then removes all the ASSEMBLY ifdef'ery in watchdog.h, as it's not
needed any more to clean this mess a bit up.
Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
Diffstat (limited to 'include/watchdog.h')
-rw-r--r-- | include/watchdog.h | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/include/watchdog.h b/include/watchdog.h index 7a09346a09..1365b154a2 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -38,54 +38,36 @@ int init_func_watchdog_reset(void); * Hardware watchdog */ #ifdef CONFIG_HW_WATCHDOG - #if defined(__ASSEMBLY__) - #define WATCHDOG_RESET bl hw_watchdog_reset - #else - extern void hw_watchdog_reset(void); + extern void hw_watchdog_reset(void); - #define WATCHDOG_RESET hw_watchdog_reset - #endif /* __ASSEMBLY__ */ + #define WATCHDOG_RESET hw_watchdog_reset #else /* * Maybe a software watchdog? */ #if defined(CONFIG_WATCHDOG) - #if defined(__ASSEMBLY__) - /* 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 + /* Don't require the watchdog to be enabled in SPL */ + #if defined(CONFIG_SPL_BUILD) && \ + !defined(CONFIG_SPL_WATCHDOG) + #define WATCHDOG_RESET() { \ + cyclic_run(); \ + } #else - /* Don't require the watchdog to be enabled in SPL */ - #if defined(CONFIG_SPL_BUILD) && \ - !defined(CONFIG_SPL_WATCHDOG) - #define WATCHDOG_RESET() { \ - cyclic_run(); \ - } - #else - extern void watchdog_reset(void); + extern void watchdog_reset(void); - #define WATCHDOG_RESET() { \ - watchdog_reset(); \ - cyclic_run(); \ - } - #endif + #define WATCHDOG_RESET() { \ + watchdog_reset(); \ + cyclic_run(); \ + } #endif #else /* * No hardware or software watchdog. */ - #if defined(__ASSEMBLY__) - #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/ - #else - #define WATCHDOG_RESET() { \ - cyclic_run(); \ + #define WATCHDOG_RESET() { \ + cyclic_run(); \ } - #endif /* __ASSEMBLY__ */ - #endif /* CONFIG_WATCHDOG && !__ASSEMBLY__ */ + #endif /* CONFIG_WATCHDOG */ #endif /* CONFIG_HW_WATCHDOG */ /* |