@@ -51,9 +51,10 @@ int init_func_watchdog_reset(void);
#if defined(__ASSEMBLY__)
#define WATCHDOG_RESET bl watchdog_reset
#else
- /* Don't require the watchdog to be enabled in SPL */
- #if defined(CONFIG_SPL_BUILD) && \
- !defined(CONFIG_SPL_WATCHDOG_SUPPORT)
+ /* Don't require the watchdog to be enabled in TPL/SPL */
+ #if ((defined(CONFIG_TPL_BUILD) || defined(CONFIG_TPL_BUILD)) && \
+ (!defined(CONFIG_TPL_WATCHDOG_SUPPORT) || \
+ !defined(CONFIG_SPL_WATCHDOG_SUPPORT)))
#define WATCHDOG_RESET() {}
#else
extern void watchdog_reset(void);
This patch handle a checks to not enable watchdog in TPL, if TPL won't require to enable that. This is useful, in rockchip platforms where watchdog would require in SPL and U-Boot proper and optional to have it in TPL. So, without this check, the TPL build failed to get the watchdog_reset function even though the watchdog is not enable for it. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> --- include/watchdog.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)