summaryrefslogtreecommitdiff
path: root/drivers/watchdog/watchdog_core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-04-09 07:29:10 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-09 07:29:10 +0300
commit5602b0af9df02783df0e8fd9afc5dcadd38a3271 (patch)
tree79c73b3042b300aedcd231b16f7cb47a2eb8d789 /drivers/watchdog/watchdog_core.c
parent413a103cf6e507f6304ec42b89ed45428942c43f (diff)
parent2d63908bdbfbce0d98195b22236ad5105dc6eba2 (diff)
downloadlinux-5602b0af9df02783df0e8fd9afc5dcadd38a3271.tar.xz
Merge tag 'linux-watchdog-5.7-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - add TI K3 RTI watchdog - add stop_on_reboot parameter to control reboot policy - wm831x_wdt: Remove GPIO handling - several small fixes, improvements and clean-ups * tag 'linux-watchdog-5.7-rc1' of git://www.linux-watchdog.org/linux-watchdog: watchdog: Add K3 RTI watchdog support dt-bindings: watchdog: Add support for TI K3 RTI watchdog watchdog: ziirave_wdt: change name to be more specific watchdog: orion: use 0 for unset heartbeat watchdog: npcm: remove whitespaces watchdog: reset last_hw_keepalive time at start watchdog: imx2_wdt: Drop .remove callback watchdog: Add stop_on_reboot parameter to control reboot policy watchdog: wm831x_wdt: Remove GPIO handling watchdog: imx7ulp: Remove unused include of init.h watchdog: imx_sc_wdt: Remove unused includes watchdog: qcom: Use irq flags from firmware watchdog: pm8916_wdt: Add system sleep callbacks watchdog: qcom-wdt: disable pretimeout on timer platform
Diffstat (limited to 'drivers/watchdog/watchdog_core.c')
-rw-r--r--drivers/watchdog/watchdog_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index 861daf4f37b2..423844757812 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -39,6 +39,10 @@
static DEFINE_IDA(watchdog_ida);
+static int stop_on_reboot = -1;
+module_param(stop_on_reboot, int, 0444);
+MODULE_PARM_DESC(stop_on_reboot, "Stop watchdogs on reboot (0=keep watching, 1=stop)");
+
/*
* Deferred Registration infrastructure.
*
@@ -254,6 +258,14 @@ static int __watchdog_register_device(struct watchdog_device *wdd)
}
}
+ /* Module parameter to force watchdog policy on reboot. */
+ if (stop_on_reboot != -1) {
+ if (stop_on_reboot)
+ set_bit(WDOG_STOP_ON_REBOOT, &wdd->status);
+ else
+ clear_bit(WDOG_STOP_ON_REBOOT, &wdd->status);
+ }
+
if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) {
wdd->reboot_nb.notifier_call = watchdog_reboot_notifier;