[PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now()

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Nov 2 19:44:30 CET 2021


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 at canonical.com>
---
v2:
	no change
---
 drivers/watchdog/sandbox_wdt.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
-- 
2.32.0



More information about the U-Boot mailing list