]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: f71808e_wdt: clear watchdog timeout occurred flag
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Thu, 11 Jun 2020 19:17:45 +0000 (21:17 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 5 Aug 2020 16:42:53 +0000 (18:42 +0200)
commit4f39d575844148fbf3081571a1f3b4ae04150958
treeca77761f6df549e8d344a84acc2b03ddab3eab19
parent802141462d844f2e6a4d63a12260d79b7afc4c34
watchdog: f71808e_wdt: clear watchdog timeout occurred flag

The flag indicating a watchdog timeout having occurred normally persists
till Power-On Reset of the Fintek Super I/O chip. The user can clear it
by writing a `1' to the bit.

The driver doesn't offer a restart method, so regular system reboot
might not reset the Super I/O and if the watchdog isn't enabled, we
won't touch the register containing the bit on the next boot.
In this case all subsequent regular reboots will be wrongly flagged
by the driver as being caused by the watchdog.

Fix this by having the flag cleared after read. This is also done by
other drivers like those for the i6300esb and mpc8xxx_wdt.

Fixes: b97cb21a4634 ("watchdog: f71808e_wdt: Fix WDTMOUT_STS register read")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200611191750.28096-5-a.fatoum@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/f71808e_wdt.c