]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/watchdog/mt7621_wdt.c
watchdog: mt7621: set WDOG_HW_RUNNING bit when appropriate
authorAndré Draszik <git@andred.net>
Fri, 12 Jan 2018 09:44:53 +0000 (09:44 +0000)
committerWim Van Sebroeck <wim@iguana.be>
Sun, 21 Jan 2018 11:44:58 +0000 (12:44 +0100)
commit392d39a863583eb6439e2ec543818250b57ef99d
tree9f645c1439d464b71ae6efee27cc7f3b055eb0c1
parent0be267255cef64e1c58475baa7b25568355a3816
watchdog: mt7621: set WDOG_HW_RUNNING bit when appropriate

If the watchdog hardware is enabled/running during boot, e.g.
due to a boot loader configuring it, we must tell the
watchdog framework about this fact so that it can ping the
watchdog until userspace opens the device and takes over
control.

Do so using the WDOG_HW_RUNNING flag that exists for exactly
that use-case.

Given the watchdog driver core doesn't know what timeout was
originally set by whoever started the watchdog (boot loader),
we make sure to update the timeout in the hardware according
to what the watchdog core thinks it is.

Signed-off-by: André Draszik <git@andred.net>
Cc: linux-watchdog@vger.kernel.org
Cc: John Crispin <john@phrozen.org>
Reviewed-by: Guenter Roeck <Linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/mt7621_wdt.c