]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: meson: keep running if already active
authorPhilippe Boos <pboos@baylibre.com>
Mon, 1 Aug 2022 09:21:50 +0000 (11:21 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 2 Oct 2022 10:55:41 +0000 (12:55 +0200)
commit4000dce52242fde35e4f465f25d75d9ea31b2038
tree1a130697eaeda47e8d87acc61bf7122ec9ccdabc
parent7cf1c8912808beec098ac939b48f5bf869b53f48
watchdog: meson: keep running if already active

If the watchdog is already running (e.g.: started by bootloader) then
the kernel driver should keep the watchdog active but the amlogic driver
turns it off.

Let the driver fix the clock rate if already active because we do not
know the previous timebase value. To avoid unintentional resetting we
temporarily set it to its maximum value.

Then keep the enable bit if is was previously active.

Signed-off-by: Philippe Boos <pboos@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20220801092150.4449-1-pboos@baylibre.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/meson_gxbb_wdt.c