Skip to content
Commit 9c44ff1c authored by This contributor prefers not to receive mails's avatar This contributor prefers not to receive mails Committed by Stefan Roese
Browse files

watchdog: Set/unset GD_FLG_WDT_READY flag in wdt_start()/wdt_stop()



Watchdog is ready after successful call of ops->start() callback in
wdt_start() function. And is stopped after successful call of ops->stop()
callback in wdt_stop function.

So move setting of GD_FLG_WDT_READY flag from initr_watchdog() function to
wdt_start() and ensure that GD_FLG_WDT_READY flag is unset in wdt_stop()
function.

This change ensures that GD_FLG_WDT_READY flag is set only when watchdog is
running. And ensures that flag is also also when watchdog was started not
only by initr_watchdog() call (e.g. by U-Boot 'wdt' command).

Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Reviewed-by: default avatarStefan Roese <sr@denx.de>
parent 90eba245
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment