hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/watchdog/booke_wdt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Watchdog timer for PowerPC Book-E systems
34 *
....@@ -5,11 +6,6 @@
56 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
67 *
78 * Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc.
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License as published by the
11
- * Free Software Foundation; either version 2 of the License, or (at your
12
- * option) any later version.
139 */
1410
1511 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -25,7 +21,7 @@
2521 /* If the kernel parameter wdt=1, the watchdog will be enabled at boot.
2622 * Also, the wdt_period sets the watchdog timer period timeout.
2723 * For E500 cpus the wdt_period sets which bit changing from 0->1 will
28
- * trigger a watchog timeout. This watchdog timeout will occur 3 times, the
24
+ * trigger a watchdog timeout. This watchdog timeout will occur 3 times, the
2925 * first time nothing will happen, the second time a watchdog exception will
3026 * occur, and the final time the board will reset.
3127 */
....@@ -43,6 +39,11 @@
4339 module_param(booke_wdt_enabled, bool, 0);
4440 static int booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT;
4541 module_param(booke_wdt_period, int, 0);
42
+static bool nowayout = WATCHDOG_NOWAYOUT;
43
+module_param(nowayout, bool, 0);
44
+MODULE_PARM_DESC(nowayout,
45
+ "Watchdog cannot be stopped once started (default="
46
+ __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
4647
4748 #ifdef CONFIG_PPC_FSL_BOOK3E
4849
....@@ -219,7 +220,6 @@
219220 static int __init booke_wdt_init(void)
220221 {
221222 int ret = 0;
222
- bool nowayout = WATCHDOG_NOWAYOUT;
223223
224224 pr_info("powerpc book-e watchdog driver loaded\n");
225225 booke_wdt_info.firmware_version = cur_cpu_spec->pvr_value;