]> git.ipfire.org Git - thirdparty/linux.git/commit
watchdog: s3c2410_wdt: Increase max timeout value of watchdog
authorSangwook Shin <sw617.shin@samsung.com>
Mon, 18 Aug 2025 02:18:24 +0000 (11:18 +0900)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Fri, 12 Sep 2025 16:06:32 +0000 (18:06 +0200)
commita36c90ab4d28bebd12b679f85ff1c51ea96d8665
tree055a9c56382df87b246db5407c47dc23ec09027c
parentdf3c6e0b6d83450563d6266e1dacc7eaf25511f4
watchdog: s3c2410_wdt: Increase max timeout value of watchdog

Increase max_timeout value from 55s to 3665038s (1018h 3min 58s) with
38400000 frequency system if the system has 32-bit WTCNT register.

cat /sys/class/watchdog/watchdog0/max_timeout
3665038

[    0.330082] s3c2410-wdt 10060000.watchdog_cl0: Heartbeat: count=1099511400000, timeout=3665038, freq=300000
[    0.330087] s3c2410-wdt 10060000.watchdog_cl0: Heartbeat: timeout=3665038, divisor=256, count=1099511400000 (fffffc87)
[    0.330127] s3c2410-wdt 10060000.watchdog_cl0: starting watchdog timer
[    0.330134] s3c2410-wdt 10060000.watchdog_cl0: Starting watchdog: count=0xfffffc87, wtcon=0001ff39
[    0.330319] s3c2410-wdt 10060000.watchdog_cl0: watchdog active, reset enabled, irq disabled

If the system has a 32-bit WTCNT, add QUIRK_HAS_32BIT_CNT to its quirk flags,
and it will operate with a 32-bit counter. If not, it will operate with a 16-bit
counter like in the previous version.

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Sangwook Shin <sw617.shin@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/s3c2410_wdt.c