summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2021-11-02 21:44:30 +0300
committerSimon Glass <sjg@chromium.org>2021-11-13 18:16:52 +0300
commit592e2e592964f76eda4fc797b296742556ecdf62 (patch)
tree287b45e3614f2c3e2df82a9596e7af37a5f7d989 /drivers/watchdog
parentace5bb3eca73ae54a28f67cde97bcd9a089cbb06 (diff)
downloadu-boot-592e2e592964f76eda4fc797b296742556ecdf62.tar.xz
sandbox: fix sandbox_wdt_expire_now()
With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system reset. To make this work calling sandbox_wdt_expire_now() must lead to a reset. With this change we can test the development suggested in [PATCH 0/4] Improved sysreset/watchdog uclass integration https://lists.denx.de/pipermail/u-boot/2021-August/458656.html Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/sandbox_wdt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/sandbox_wdt.c b/drivers/watchdog/sandbox_wdt.c
index e05d82789f..535614f04d 100644
--- a/drivers/watchdog/sandbox_wdt.c
+++ b/drivers/watchdog/sandbox_wdt.c
@@ -39,6 +39,7 @@ static int sandbox_wdt_reset(struct udevice *dev)
static int sandbox_wdt_expire_now(struct udevice *dev, ulong flags)
{
sandbox_wdt_start(dev, 1, flags);
+ sandbox_reset();
return 0;
}