Skip to content

Commit ac3dbb9

Browse files
sreWim Van Sebroeck
authored andcommitted
watchdog: dw_wdt: Fix default timeout
The Synopsys Watchdog driver sets the default timeout to 30 seconds, but on some devices this is not a valid timeout. E.g. on RK3588 the actual timeout being used is 44 seconds instead. Once the watchdog is started the value is updated accordingly, but it would be better to expose a sensible timeout to userspace without the need to first start the watchdog. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent ddb8172 commit ac3dbb9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/watchdog/dw_wdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
644644
} else {
645645
wdd->timeout = DW_WDT_DEFAULT_SECONDS;
646646
watchdog_init_timeout(wdd, 0, dev);
647+
/* Limit timeout value to hardware constraints. */
648+
dw_wdt_set_timeout(wdd, wdd->timeout);
647649
}
648650

649651
platform_set_drvdata(pdev, dw_wdt);

0 commit comments

Comments
 (0)