]> git.baikalelectronics.ru Git - uboot.git/commit
watchdog: honour hw_margin_ms DT property
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Fri, 13 Mar 2020 16:04:58 +0000 (17:04 +0100)
committerStefan Roese <sr@denx.de>
Wed, 15 Apr 2020 06:54:00 +0000 (08:54 +0200)
commit701cf8cdc7a5a3b9b66106dd761d8ba8eff10845
tree21f161d23e0a1179b26d5f80354e06eeae906861
parent3dee850440c334acff01c90715cd4a07d2e2db77
watchdog: honour hw_margin_ms DT property

Some watchdog devices, e.g. external gpio-triggered ones, must be
reset more often than once per second, which means that the current
rate-limiting logic in watchdog_reset() fails to keep the board alive.

gpio-wdt.txt in the linux source tree defines a "hw_margin_ms"
property used to specifiy the maximum time allowed between resetting
the device. Allow any watchdog device to specify such a property, and
then use a reset period of one quarter of that. We keep the current
default of resetting once every 1000ms.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/watchdog/wdt-uclass.c