summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/atlas7_wdt.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-03-01 13:45:17 -0300
committerWim Van Sebroeck <wim@iguana.be>2016-03-16 21:08:09 +0100
commit882dec1ff125e9020157d27672ec11c2fdfb82c2 (patch)
tree27e6c950208de1a85714a437a143870db2ea8968 /drivers/watchdog/atlas7_wdt.c
parent57d2caaabfc744692e36ff83b508d7c52c70e36f (diff)
watchdog: s3c2410_wdt: Add max and min timeout values
The watchdog maximum timeout value is determined by the number of bits for the interval timer counter, its source clock frequency, the number of bits of the prescaler and maximum divider value. This can be calculated with the following equation: max_timeout = counter / (freq / (max_prescale + 1) / max_divider) Setting a maximum timeout value will allow the watchdog core to refuse user-space calls to the WDIOC_SETTIMEOUT ioctl that sets not supported timeout values. For example, systemd tries to set a timeout of 10 minutes on reboot to ensure that the machine will be rebooted even if a reboot failed. This leads to the following error message on an Exynos5422 Odroid XU4 board: [ 147.986045] s3c2410-wdt 101d0000.watchdog: timeout 600 too big Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/atlas7_wdt.c')
0 files changed, 0 insertions, 0 deletions