Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <sebastian.reichel@collabora.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250717-dw-wdt-fix-initial-timeout-v1-1-86dc864d48dd@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Sebastian Reichel and committed by
Wim Van Sebroeck
ac3dbb91 ddb8172c

+2
+2
drivers/watchdog/dw_wdt.c
··· 644 644 } else { 645 645 wdd->timeout = DW_WDT_DEFAULT_SECONDS; 646 646 watchdog_init_timeout(wdd, 0, dev); 647 + /* Limit timeout value to hardware constraints. */ 648 + dw_wdt_set_timeout(wdd, wdd->timeout); 647 649 } 648 650 649 651 platform_set_drvdata(pdev, dw_wdt);