watchdog updates for v7.4 commit window

* Core/generic
 
   - Replace __MODULE_STRING() with __stringify()
 
   - Use assign_bit() where applicable
 
   - Use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops
 
   - Fix repeated words and typos in comments
 
   - Differentiate scenarios when watchdog is closed
 
 * Added device support in existing drivers
 
   - mtk_wdt: Support for MediaTek MT8167 and MT8127
 
   - apple_wdt: Support for T8140
 
   - s3c2410_wdt: Support for Exynos 5515
 
 * Various other minor bug fixes and improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmrWu1IACgkQyx8mb86f
 mYEX/w//aSwUBR9brY81lbG7hOsEp0bbR2KGhXIjbMbwo59b6OnAPlmrfj/+u6mE
 8Kf2nZnBzGUomLscbE9YL5yJ6dv11Ti8BPh4WO3vgZ9QMtfQUi/RxQnPd+vP/mzz
 lXKa+ar93x/DwgKCX1GQDWfby/h9jO9tfaoz2hpSAJizQImxZOMEtY/xaRhqxzDH
 rtGXxy2vlVOKw1cNYfKfezdYN7hJEo4cKM+/vXvg5VwnBaSSOLxB5m3LvNkwyD18
 1aM4BbJ9YXMW9HwQ8rB4sbiqTHMq4CCoADLUTEAs3EdQriAOhCEAf2pKvWRr+a+3
 Lc3/JirvNene8K8+e2uhOH/5Hsg1dXDQXJZyIcS9MsaHyokvJcfWwCSw8A2BLOaq
 7yKTtMYTyoTdrnw3DawcGP8kdNlC+3yC4YpnYXOKH0rbF4E9eIpCHTT4gNPP0cfN
 SeZD7j1T8lJ5dPPFXUgfRBC3j9/hM5r4kswBblKOF674j1TwyoRUSzVzZ96yvyV3
 r1/I0V+uz2kBWCWpT1gTVutXxPJJJUzVqbd5KGKW8MuAnLnYoLhH7W1cZ7aa9T/Q
 h96i12g8O3sidWboktCPNYlryGadgvZw7lHl0PqR+/P1/ylRX6M0k2ZilRKLVITR
 CFyXC6YSCJxic4GEjoj1wIUT0cJjbN0Jb8+mqXHTJu1vVVk4pq8=
 =IcKh
 -----END PGP SIGNATURE-----

Merge tag 'watchdog-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull watchdog updates from Guenter Roeck:
 "Core/generic:
   - Replace __MODULE_STRING() with __stringify()
   - Use assign_bit() where applicable
   - Use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops
   - Fix repeated words and typos in comments
   - Differentiate scenarios when watchdog is closed

  Added device support in existing drivers:
   - mtk_wdt: Support for MediaTek MT8167 and MT8127
   - apple_wdt: Support for T8140
   - s3c2410_wdt: Support for Exynos 5515

  Various other minor bug fixes and improvements"

* tag 'watchdog-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (22 commits)
  watchdog: mediatek: Apply the driver's mode to a watchdog left running
  dt-bindings: watchdog: apple,wdt: Add t8140 compatible
  watchdog: Replace __MODULE_STRING() with __stringify()
  watchdog: use assign_bit() where applicable
  watchdog: mediatek: Add support for mt8167 toprgu/watchdog
  dt-bindings: watchdog: Add compatible for MediaTek mt8167
  watchdog: sp805_wdt: fix suspend/resume handling of HW_RUNNING watchdog
  watchdog: PM: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops
  watchdog: mediatek: Add wdt/toprgu resets for mt6589
  watchdog: msc313e: Replace commas with semicolons in probe()
  watchdog: sp805: Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS
  watchdog: fix repeated words in comments
  watchdog: fix typos in comments
  watchdog: i6300esb: do not stop an already running watchdog
  dt-bindings: watchdog: mediatek: Add MT8127
  watchdog: Differentiate scenarios when watchdog is closed
  dt-bindings: watchdog: renesas,r9a09g057-wdt: Add CPG/MSSR syscon support
  watchdog: mediatek: acknowledge pretimeout interrupt
  watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data
  dt-bindings: watchdog: samsung-wdt: Add exynos5515-wdt compatible
  ...
This commit is contained in:
Linus Torvalds 2026-10-22 07:32:49 -10:00
commit 22cbcdafe1
141 changed files with 713 additions and 317 deletions

View File

@ -22,6 +22,7 @@ properties:
- apple,t6031-wdt
- apple,t8122-wdt
- apple,t8132-wdt
- apple,t8140-wdt
- const: apple,t8103-wdt
- items:
- enum:

View File

@ -26,6 +26,7 @@ properties:
- mediatek,mt6795-wdt
- mediatek,mt7986-wdt
- mediatek,mt7988-wdt
- mediatek,mt8167-wdt
- mediatek,mt8183-wdt
- mediatek,mt8186-wdt
- mediatek,mt8188-wdt
@ -40,6 +41,7 @@ properties:
- mediatek,mt7622-wdt
- mediatek,mt7623-wdt
- mediatek,mt7629-wdt
- mediatek,mt8127-wdt
- mediatek,mt8173-wdt
- mediatek,mt8188-wdt
- mediatek,mt8189-wdt

View File

@ -48,6 +48,17 @@ properties:
resets:
maxItems: 1
renesas,sysc:
description:
System controller registers control the start/stop of the WDT, and halt debug.
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to system controller
- description: watchdog IP instance index
minimum: 0
maximum: 5
timeout-sec: true
required:
@ -73,15 +84,29 @@ allOf:
minItems: 2
clock-names:
minItems: 2
renesas,sysc: false
else:
properties:
clocks:
maxItems: 1
clock-names:
maxItems: 1
reg:
minItems: 2
resets: false
allOf:
- if:
required:
- renesas,sysc
then:
properties:
reg:
maxItems: 1
else:
properties:
reg:
description: Deprecated. Use the renesas,sysc property along with
the watchdog IP instance index instead.
minItems: 2
deprecated: true
additionalProperties: false

View File

@ -22,6 +22,7 @@ properties:
- samsung,s3c6410-wdt # for S3C6410, S5PV210 and Exynos4
- samsung,exynos5250-wdt # for Exynos5250
- samsung,exynos5420-wdt # for Exynos5420
- samsung,exynos5515-wdt
- samsung,exynos7-wdt # for Exynos7
- samsung,exynos850-wdt # for Exynos850
- samsung,exynos990-wdt # for Exynos990
@ -57,7 +58,7 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to the PMU system controller node (in case of Exynos5250,
Exynos5420, Exynos7, Exynos850, Exynos990 and gs101).
Exynos5420, Exynos5515, Exynos7, Exynos850, Exynos990 and gs101).
required:
- compatible
@ -93,6 +94,26 @@ allOf:
- samsung,cluster-index
- samsung,syscon-phandle
- if:
properties:
compatible:
contains:
enum:
- samsung,exynos5515-wdt
then:
properties:
clocks:
items:
- description: Bus clock, used for register interface
- description: Source clock (driving watchdog counter)
clock-names:
items:
- const: watchdog
- const: watchdog_src
samsung,cluster-index: false
required:
- samsung,syscon-phandle
- if:
properties:
compatible:

View File

@ -515,6 +515,8 @@ sbsa_gwdt:
nowayout:
Watchdog cannot be stopped once started
(default=kernel config parameter)
early_enable:
Watchdog is started on module insertion (default=0)
-------------------------------------------------

View File

@ -64,6 +64,7 @@
#include <linux/init.h> /* For __init/__exit/... */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For inb/outb/... */
#include <linux/stringify.h> /* For __stringify */
/* Module information */
#define DRV_NAME "acquirewdt"
@ -92,7 +93,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Watchdog Operations

View File

@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRIVER_NAME "advantech_ec_wdt"
@ -49,7 +50,7 @@ static ktime_t ec_timestamp;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Default Watchdog timer setting (" __MODULE_STRING(DEFAULT_TIME) "s). The range is from " __MODULE_STRING(MIN_TIME) " to " __MODULE_STRING(MAX_TIME) ".");
"Default Watchdog timer setting (" __stringify(DEFAULT_TIME) "s). The range is from " __stringify(MIN_TIME) " to " __stringify(MAX_TIME) ".");
static void adv_ec_wdt_timing_gate(void)
{

View File

@ -37,6 +37,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#define DRV_NAME "advantechwdt"
@ -71,13 +72,13 @@ static int timeout = WATCHDOG_TIMEOUT; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1<= timeout <=63, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Watchdog Operations

View File

@ -20,6 +20,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/watchdog.h>
#include <linux/stringify.h>
/* Base address of timer and watchdog registers */
#define TIMER_CTRL 0x0
@ -44,12 +45,12 @@ struct airoha_wdt_desc {
static int heartbeat = WDT_HEARTBEAT;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. (default="
__MODULE_STRING(WDT_HEARTBEAT) ")");
__stringify(WDT_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int airoha_wdt_start(struct watchdog_device *wdog_dev)
{

View File

@ -18,6 +18,7 @@
#include <linux/pci.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/stringify.h>
#define WATCHDOG_NAME "ALi_M1535"
#define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */
@ -34,13 +35,13 @@ static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (0 < timeout < 18000, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* ali_start - start watchdog countdown

View File

@ -36,6 +36,7 @@
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#define WDT_ENABLE 0x9C
@ -64,7 +65,7 @@ static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (1<=timeout<=3600, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static int use_gpio; /* Use the pic (for a1d revision alim7101) */
module_param(use_gpio, int, 0);
@ -82,7 +83,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Whack the dog

View File

@ -13,6 +13,7 @@
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <uapi/linux/psci.h>
@ -191,7 +192,7 @@ MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Julius Werner <jwerner@chromium.org>");

View File

@ -16,6 +16,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -70,7 +71,7 @@ MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct armada_37xx_watchdog {
struct watchdog_device wdt;

View File

@ -17,12 +17,13 @@
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct aspeed_wdt_scu {
const char *compatible;
u32 reset_status_reg;

View File

@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/uaccess.h>
@ -36,13 +37,13 @@ static struct regmap *regmap_st;
module_param(wdt_time, int, 0);
MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default="
__MODULE_STRING(WDT_DEFAULT_TIME) ")");
__stringify(WDT_DEFAULT_TIME) ")");
#ifdef CONFIG_WATCHDOG_NOWAYOUT
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#endif

View File

@ -32,6 +32,7 @@
#include <linux/uaccess.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/stringify.h>
#include "at91sam9_wdt.h"
@ -70,12 +71,12 @@
static int heartbeat;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. "
"(default = " __MODULE_STRING(WDT_HEARTBEAT) ")");
"(default = " __stringify(WDT_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
#define to_wdt(wdd) container_of(wdd, struct at91wdt, wdd)
struct at91wdt {

View File

@ -19,6 +19,7 @@
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
/* Register definitions */
@ -570,11 +571,11 @@ module_platform_driver(atcwdt_driver);
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default="
__MODULE_STRING(ATCWDT_TIMEOUT) ")");
__stringify(ATCWDT_TIMEOUT) ")");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("CL Wang <cl634@andestech.com>");

View File

@ -32,6 +32,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#define DRIVER_NAME "ath79-wdt"
@ -50,12 +51,12 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
static int timeout = WDT_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds "
"(default=" __MODULE_STRING(WDT_TIMEOUT) "s)");
"(default=" __stringify(WDT_TIMEOUT) "s)");
static unsigned long wdt_flags;

View File

@ -20,6 +20,7 @@
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
#define PM_RSTC 0x1c
#define PM_RSTS 0x20
@ -229,7 +230,7 @@ MODULE_PARM_DESC(heartbeat, "Initial watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_ALIAS("platform:bcm2835-wdt");
MODULE_AUTHOR("Lubomir Rintel <lkundrak@v3.sk>");

View File

@ -21,6 +21,7 @@
#include <linux/watchdog.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/stringify.h>
#define DRV_NAME "bcm47xx_wdt"
@ -33,12 +34,12 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog time in seconds. (default="
__MODULE_STRING(WDT_DEFAULT_TIME) ")");
__stringify(WDT_DEFAULT_TIME) ")");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd)
{

View File

@ -12,6 +12,7 @@
#include <linux/platform_device.h>
#include <linux/platform_data/bcm7038_wdt.h>
#include <linux/pm.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define WDT_START_1 0xff00
@ -228,7 +229,7 @@ module_platform_driver(bcm7038_wdt_driver);
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Driver for Broadcom 7038 SoCs Watchdog");
MODULE_AUTHOR("Justin Chen");

View File

@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/smp.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#include <asm/reg_booke.h>
@ -43,7 +44,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#ifdef CONFIG_PPC_E500

View File

@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define CDNS_WDT_DEFAULT_TIMEOUT 10
@ -52,12 +53,12 @@ static int nowayout = WATCHDOG_NOWAYOUT;
module_param(wdt_timeout, int, 0644);
MODULE_PARM_DESC(wdt_timeout,
"Watchdog time in seconds. (default="
__MODULE_STRING(CDNS_WDT_DEFAULT_TIMEOUT) ")");
__stringify(CDNS_WDT_DEFAULT_TIMEOUT) ")");
module_param(nowayout, int, 0644);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/**
* struct cdns_wdt - Watchdog device structure
@ -359,7 +360,7 @@ static int cdns_wdt_probe(struct platform_device *pdev)
* @dev: handle to the device structure.
* Return: 0 always.
*/
static int __maybe_unused cdns_wdt_suspend(struct device *dev)
static int cdns_wdt_suspend(struct device *dev)
{
struct cdns_wdt *wdt = dev_get_drvdata(dev);
@ -377,7 +378,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
* @dev: handle to the device structure.
* Return: 0 on success, errno otherwise.
*/
static int __maybe_unused cdns_wdt_resume(struct device *dev)
static int cdns_wdt_resume(struct device *dev)
{
int ret;
struct cdns_wdt *wdt = dev_get_drvdata(dev);
@ -394,7 +395,7 @@ static int __maybe_unused cdns_wdt_resume(struct device *dev)
return 0;
}
static SIMPLE_DEV_PM_OPS(cdns_wdt_pm_ops, cdns_wdt_suspend, cdns_wdt_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(cdns_wdt_pm_ops, cdns_wdt_suspend, cdns_wdt_resume);
static const struct of_device_id cdns_wdt_of_match[] = {
{ .compatible = "cdns,wdt-r1p2", },
@ -408,7 +409,7 @@ static struct platform_driver cdns_wdt_driver = {
.driver = {
.name = "cdns-wdt",
.of_match_table = cdns_wdt_of_match,
.pm = &cdns_wdt_pm_ops,
.pm = pm_sleep_ptr(&cdns_wdt_pm_ops),
},
};

View File

@ -11,6 +11,7 @@
#include <linux/limits.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#include <linux/mfd/cgbc.h>
@ -38,19 +39,19 @@ static unsigned int timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (>=0, default="
__MODULE_STRING(CGBC_WDT_DEFAULT_TIMEOUT) ")");
__stringify(CGBC_WDT_DEFAULT_TIMEOUT) ")");
static unsigned int pretimeout = CGBC_WDT_DEFAULT_PRETIMEOUT;
module_param(pretimeout, uint, 0);
MODULE_PARM_DESC(pretimeout,
"Watchdog pretimeout in seconds. (>=0, default="
__MODULE_STRING(CGBC_WDT_DEFAULT_PRETIMEOUT) ")");
__stringify(CGBC_WDT_DEFAULT_PRETIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct cgbc_wdt_data {
struct cgbc_device_data *cgbc;

View File

@ -17,6 +17,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/stringify.h>
#include <linux/mfd/da9052/reg.h>
#include <linux/mfd/da9052/da9052.h>
@ -34,13 +35,13 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int timeout;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (default = "
__MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")");
__stringify(WDT_DEFAULT_TIMEOUT) ")");
static const struct {
u8 reg_val;

View File

@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/watchdog.h>
#include <linux/delay.h>
#include <linux/stringify.h>
#include <linux/mfd/da9055/core.h>
#include <linux/mfd/da9055/reg.h>
@ -23,7 +24,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#define DA9055_DEF_TIMEOUT 4
#define DA9055_TWDMIN 256

View File

@ -248,7 +248,7 @@ static int da9062_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &wdt->wdtdev);
}
static int __maybe_unused da9062_wdt_suspend(struct device *dev)
static int da9062_wdt_suspend(struct device *dev)
{
struct watchdog_device *wdd = dev_get_drvdata(dev);
struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
@ -262,7 +262,7 @@ static int __maybe_unused da9062_wdt_suspend(struct device *dev)
return 0;
}
static int __maybe_unused da9062_wdt_resume(struct device *dev)
static int da9062_wdt_resume(struct device *dev)
{
struct watchdog_device *wdd = dev_get_drvdata(dev);
struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
@ -276,14 +276,14 @@ static int __maybe_unused da9062_wdt_resume(struct device *dev)
return 0;
}
static SIMPLE_DEV_PM_OPS(da9062_wdt_pm_ops,
static DEFINE_SIMPLE_DEV_PM_OPS(da9062_wdt_pm_ops,
da9062_wdt_suspend, da9062_wdt_resume);
static struct platform_driver da9062_wdt_driver = {
.probe = da9062_wdt_probe,
.driver = {
.name = "da9062-watchdog",
.pm = &da9062_wdt_pm_ops,
.pm = pm_sleep_ptr(&da9062_wdt_pm_ops),
.of_match_table = da9062_compatible_id_table,
},
};

View File

@ -19,6 +19,7 @@
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/stringify.h>
#define MODULE_NAME "DAVINCI-WDT: "
@ -120,7 +121,7 @@ static unsigned int davinci_wdt_get_timeleft(struct watchdog_device *wdd)
u32 val;
struct davinci_wdt_device *davinci_wdt = watchdog_get_drvdata(wdd);
/* if timeout has occured then return 0 */
/* if timeout has occurred then return 0 */
val = ioread32(davinci_wdt->base + WDTCR);
if (val & WDFLAG)
return 0;
@ -250,8 +251,8 @@ MODULE_DESCRIPTION("DaVinci Watchdog Driver");
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat period in seconds from 1 to "
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
__stringify(MAX_HEARTBEAT) ", default "
__stringify(DEFAULT_HEARTBEAT));
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:davinci-wdt");

View File

@ -15,6 +15,7 @@
#include <linux/uaccess.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/mfd/db8500-prcmu.h>
@ -27,13 +28,13 @@ static unsigned int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int db8500_wdt_start(struct watchdog_device *wdd)
{

View File

@ -27,6 +27,7 @@
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/reset.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define WDOG_CONTROL_REG_OFFSET 0x00
@ -66,7 +67,7 @@ static const u32 dw_wdt_fix_tops[DW_WDT_NUM_TOPS] = {
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
enum dw_wdt_rmod {
DW_WDT_RMOD_RESET = 1,

View File

@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define MODULE_NAME "ebc-c384_wdt"
@ -30,12 +31,12 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static int ebc_c384_wdt_start(struct watchdog_device *wdev)
{

View File

@ -56,6 +56,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
static unsigned long eurwdt_is_open;
@ -77,7 +78,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Some symbolic names

View File

@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRV_NAME "exar_wdt"
@ -70,13 +71,13 @@ static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1<=timeout<=15300, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int exar_sio_enter(const unsigned short config_port,
const unsigned char key)

View File

@ -14,6 +14,7 @@
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRVNAME "f71808e_wdt"
@ -81,20 +82,20 @@ static int timeout = WATCHDOG_TIMEOUT; /* default timeout in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1<= timeout <="
__MODULE_STRING(WATCHDOG_MAX_TIMEOUT) " (default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_MAX_TIMEOUT) " (default="
__stringify(WATCHDOG_TIMEOUT) ")");
static unsigned int pulse_width = WATCHDOG_PULSE_WIDTH;
module_param(pulse_width, uint, 0);
MODULE_PARM_DESC(pulse_width,
"Watchdog signal pulse width. 0(=level), 1, 25, 30, 125, 150, 5000 or 6000 ms"
" (default=" __MODULE_STRING(WATCHDOG_PULSE_WIDTH) ")");
" (default=" __stringify(WATCHDOG_PULSE_WIDTH) ")");
static unsigned int f71862fg_pin = WATCHDOG_F71862FG_PIN;
module_param(f71862fg_pin, uint, 0);
MODULE_PARM_DESC(f71862fg_pin,
"Watchdog f71862fg reset output pin configuration. Choose pin 56 or 63"
" (default=" __MODULE_STRING(WATCHDOG_F71862FG_PIN)")");
" (default=" __stringify(WATCHDOG_F71862FG_PIN)")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0444);

View File

@ -34,6 +34,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#include <sysdev/fsl_soc.h>
@ -70,7 +71,7 @@ static DEFINE_SPINLOCK(gef_wdt_spinlock);
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int gef_wdt_toggle_wdc(int enabled_predicate, int field_shift)

View File

@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#include <linux/cs5535.h>
@ -34,13 +35,13 @@ static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1<= timeout <=131, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static struct platform_device *geodewdt_platform_device;
static unsigned long wdt_flags;

View File

@ -11,13 +11,14 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#define SOFT_TIMEOUT_MIN 1
#define SOFT_TIMEOUT_DEF 60

View File

@ -20,6 +20,7 @@
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/types.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#ifdef CONFIG_HPWDT_NMI_DECODING
#include <asm/nmi.h>
@ -432,7 +433,7 @@ MODULE_PARM_DESC(timeout, "Alias of soft_margin");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
module_param(kdumptimeout, int, 0444);
MODULE_PARM_DESC(kdumptimeout, "Timeout applied for crash kernel transition in seconds");

View File

@ -37,6 +37,7 @@
#include <linux/ioport.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/stringify.h>
/* Module and version information */
#define ESB_MODULE_NAME "i6300ESB timer"
@ -74,19 +75,19 @@
#define ESB_HEARTBEAT_MIN 1
#define ESB_HEARTBEAT_MAX 2046
#define ESB_HEARTBEAT_DEFAULT 30
#define ESB_HEARTBEAT_RANGE __MODULE_STRING(ESB_HEARTBEAT_MIN) \
"<heartbeat<" __MODULE_STRING(ESB_HEARTBEAT_MAX)
#define ESB_HEARTBEAT_RANGE __stringify(ESB_HEARTBEAT_MIN) \
"<heartbeat<" __stringify(ESB_HEARTBEAT_MAX)
static int heartbeat; /* in seconds */
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat in seconds. (" ESB_HEARTBEAT_RANGE
", default=" __MODULE_STRING(ESB_HEARTBEAT_DEFAULT) ")");
", default=" __stringify(ESB_HEARTBEAT_DEFAULT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/* internal variables */
struct esb_dev {
@ -264,13 +265,21 @@ static void esb_initdevice(struct esb_dev *edev)
*/
pci_write_config_word(edev->pdev, ESB_CONFIG_REG, 0x0003);
/* Check that the WDT isn't already locked */
/* Check the current state of the WDT */
pci_read_config_byte(edev->pdev, ESB_LOCK_REG, &val1);
if (val1 & ESB_WDT_LOCK)
dev_warn(&edev->pdev->dev, "nowayout already set\n");
/* Set the timer to watchdog mode and disable it for now */
pci_write_config_byte(edev->pdev, ESB_LOCK_REG, 0x00);
if (val1 & ESB_WDT_ENABLE) {
/*
* The watchdog is already running, e.g. enabled by
* firmware. Do not stop it, just mark it as running.
*/
set_bit(WDOG_HW_RUNNING, &edev->wdd.status);
} else {
/* Set the timer to watchdog mode and disable it for now */
pci_write_config_byte(edev->pdev, ESB_LOCK_REG, 0x00);
}
/* Check if the watchdog was previously triggered */
esb_unlock_registers(edev);
@ -301,7 +310,10 @@ static int esb_probe(struct pci_dev *pdev,
if (!esb_getdevice(edev))
return -ENODEV;
/* Initialize the watchdog and make sure it does not run */
/*
* Initialize the watchdog, keeping it running if it was already
* started, e.g. by firmware.
*/
edev->wdd.info = &esb_info;
edev->wdd.ops = &esb_ops;
edev->wdd.min_timeout = ESB_HEARTBEAT_MIN;

View File

@ -60,6 +60,7 @@
#include <linux/ioport.h> /* For io-port access */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For inb/outb/... */
#include <linux/stringify.h> /* For __stringify */
#include <linux/platform_data/itco_wdt.h>
#include <linux/mfd/intel_pmc_bxt.h>
@ -115,13 +116,13 @@ static int heartbeat = WATCHDOG_TIMEOUT; /* in seconds */
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog timeout in seconds. "
"5..76 (TCO v1) or 3..614 (TCO v2), default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int turn_SMI_watchdog_clear_off = 1;
module_param(turn_SMI_watchdog_clear_off, int, 0);

View File

@ -41,6 +41,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
static struct platform_device *ibwdt_platform_device;
@ -96,13 +97,13 @@ static int timeout = WATCHDOG_TIMEOUT; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 0<= timeout <=30, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*

View File

@ -21,6 +21,7 @@
#include <linux/dmi.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
enum {
@ -413,7 +414,7 @@ module_exit(ibmasr_exit);
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_DESCRIPTION("IBM Automatic Server Restart driver");
MODULE_AUTHOR("Andrey Panin");

View File

@ -17,6 +17,7 @@
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/spinlock.h>
#include <linux/stringify.h>
#define DRIVER_NAME "ie6xx_wdt"
@ -49,14 +50,14 @@ static unsigned int timeout = DEFAULT_TIME;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Default Watchdog timer setting ("
__MODULE_STRING(DEFAULT_TIME) "s)."
__stringify(DEFAULT_TIME) "s)."
"The range is from 1 to 600");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static u8 resetmode = 0x10;
module_param(resetmode, byte, 0);

View File

@ -43,6 +43,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
/* registers */
@ -71,12 +72,12 @@
static int heartbeat;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds "
"(default=" __MODULE_STRING(PDC_WDT_DEF_TIMEOUT) ")");
"(default=" __stringify(PDC_WDT_DEF_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
struct pdc_wdt_dev {
struct watchdog_device wdt_dev;

View File

@ -29,6 +29,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRIVER_NAME "imx2-wdt"
@ -79,12 +80,12 @@ struct imx2_wdt_device {
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default="
__MODULE_STRING(IMX2_WDT_DEFAULT_TIME) ")");
__stringify(IMX2_WDT_DEFAULT_TIME) ")");
static const struct watchdog_info imx2_wdt_info = {
.identity = "imx2+ watchdog",

View File

@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define WDOG_CS 0x0
@ -51,7 +52,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0000);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct imx_wdt_hw_feature {
bool prescaler_enable;

View File

@ -11,6 +11,7 @@
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DEFAULT_TIMEOUT 60
@ -39,7 +40,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0000);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct imx_sc_wdt_device {
struct watchdog_device wdd;

View File

@ -22,6 +22,7 @@
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#include <asm/sgi/mc.h>
static unsigned long indydog_alive;
@ -33,7 +34,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static void indydog_start(void)
{

View File

@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define INTEL_OC_WDT_TOV GENMASK(9, 0)
@ -48,12 +49,12 @@ struct intel_oc_wdt {
static int heartbeat;
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. (default="
__MODULE_STRING(WDT_HEARTBEAT) ")");
__stringify(WDT_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int intel_oc_wdt_start(struct watchdog_device *wdd)
{

View File

@ -29,6 +29,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/printk.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -105,13 +106,13 @@ static bool nowayout = DEFAULT_NOWAYOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, default="
__MODULE_STRING(DEFAULT_TIMEOUT));
__stringify(DEFAULT_TIMEOUT));
module_param(testmode, int, 0);
MODULE_PARM_DESC(testmode, "Watchdog test mode (1 = no reboot), default="
__MODULE_STRING(DEFAULT_TESTMODE));
__stringify(DEFAULT_TESTMODE));
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started, default="
__MODULE_STRING(WATCHDOG_NOWAYOUT));
__stringify(WATCHDOG_NOWAYOUT));
/* Superio Chip */

View File

@ -19,6 +19,7 @@
#include <linux/err.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#define DEFAULT_HEARTBEAT 5
#define MAX_HEARTBEAT 2048
@ -27,14 +28,14 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned int heartbeat = DEFAULT_HEARTBEAT;
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat period in seconds from 1 to "
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
__stringify(MAX_HEARTBEAT) ", default "
__stringify(DEFAULT_HEARTBEAT));
struct jz4740_wdt_drvdata {
struct watchdog_device wdt;

View File

@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
/* Non-secure watchdog register offsets */
@ -39,12 +40,12 @@
static unsigned int timeout = WDT_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout period in seconds (default = "
__MODULE_STRING(WDT_TIMEOUT) ")");
__stringify(WDT_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default = "
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct keembay_wdt {
struct watchdog_device wdd;
@ -250,7 +251,7 @@ static int keembay_wdt_probe(struct platform_device *pdev)
return 0;
}
static int __maybe_unused keembay_wdt_suspend(struct device *dev)
static int keembay_wdt_suspend(struct device *dev)
{
struct keembay_wdt *wdt = dev_get_drvdata(dev);
@ -260,7 +261,7 @@ static int __maybe_unused keembay_wdt_suspend(struct device *dev)
return 0;
}
static int __maybe_unused keembay_wdt_resume(struct device *dev)
static int keembay_wdt_resume(struct device *dev)
{
struct keembay_wdt *wdt = dev_get_drvdata(dev);
@ -270,7 +271,7 @@ static int __maybe_unused keembay_wdt_resume(struct device *dev)
return 0;
}
static SIMPLE_DEV_PM_OPS(keembay_wdt_pm_ops, keembay_wdt_suspend,
static DEFINE_SIMPLE_DEV_PM_OPS(keembay_wdt_pm_ops, keembay_wdt_suspend,
keembay_wdt_resume);
static const struct of_device_id keembay_wdt_match[] = {
@ -284,7 +285,7 @@ static struct platform_driver keembay_wdt_driver = {
.driver = {
.name = "keembay_wdt",
.of_match_table = keembay_wdt_match,
.pm = &keembay_wdt_pm_ops,
.pm = pm_sleep_ptr(&keembay_wdt_pm_ops),
},
};

View File

@ -21,6 +21,7 @@
#include <linux/uaccess.h>
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/mfd/kempld.h>
#define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4)
@ -85,19 +86,19 @@ static unsigned int timeout = DEFAULT_TIMEOUT;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (>=0, default="
__MODULE_STRING(DEFAULT_TIMEOUT) ")");
__stringify(DEFAULT_TIMEOUT) ")");
static unsigned int pretimeout = DEFAULT_PRETIMEOUT;
module_param(pretimeout, uint, 0);
MODULE_PARM_DESC(pretimeout,
"Watchdog pretimeout in seconds. (>=0, default="
__MODULE_STRING(DEFAULT_PRETIMEOUT) ")");
__stringify(DEFAULT_PRETIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int kempld_wdt_set_stage_action(struct kempld_wdt_data *wdt_data,
struct kempld_wdt_stage *stage,

View File

@ -10,6 +10,7 @@
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -48,13 +49,13 @@ static int timeout; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1 <= timeout <= 255, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct se10_wdt {
struct watchdog_device wdd;

View File

@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define IOREGION_OFFSET 4 /* Use EC port 1 */
@ -28,13 +29,13 @@ static int timeout; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1 <= timeout <= 255, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#define LNV_SE30_NAME "lenovo-se30-wdt"
#define LNV_SE30_ID 0x0110

View File

@ -10,6 +10,7 @@
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -37,13 +38,13 @@ static int timeout; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. 1 <= timeout <= 255, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ".");
__stringify(WATCHDOG_TIMEOUT) ".");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct se_30g2_60_wdt {
struct watchdog_device wdd;

View File

@ -9,6 +9,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
/* Loongson Watchdog Register Definitions */
@ -19,12 +20,12 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned int heartbeat;
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (default="
__MODULE_STRING(DEFAULT_HEARTBEAT) ")");
__stringify(DEFAULT_HEARTBEAT) ")");
struct ls1x_wdt_pdata {
u32 timer_offset;

View File

@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
/* Registers */
@ -41,12 +42,12 @@
static int heartbeat;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds (default="
__MODULE_STRING(LPC18XX_WDT_DEF_TIMEOUT) ")");
__stringify(LPC18XX_WDT_DEF_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct lpc18xx_wdt_dev {
struct watchdog_device wdt_dev;

View File

@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/property.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -355,7 +356,7 @@ MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(
nowayout,
"Watchdog cannot be stopped once started (default=" __MODULE_STRING(
"Watchdog cannot be stopped once started (default=" __stringify(
WATCHDOG_NOWAYOUT) ")");
MODULE_AUTHOR("Zi-Yu Chen <zychennvt@gmail.com>");

View File

@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/property.h>
#include <linux/stringify.h>
#define DEFAULT_HEARTBEAT 60
#define MAX_HEARTBEAT 60
@ -64,7 +65,7 @@ struct max63xx_wdt {
* delay (selected with the "nodelay" parameter).
*
* I also decided to remove from the tables any timeout smaller than a
* second, as it looked completly overkill...
* second, as it looked completely overkill...
*/
/* Timeouts in second */
@ -283,12 +284,12 @@ MODULE_DESCRIPTION("max63xx Watchdog Driver");
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat period in seconds from 1 to "
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
__stringify(MAX_HEARTBEAT) ", default "
__stringify(DEFAULT_HEARTBEAT));
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
module_param(nodelay, int, 0);
MODULE_PARM_DESC(nodelay,

View File

@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
static bool nowayout = WATCHDOG_NOWAYOUT;
@ -255,7 +256,7 @@ MODULE_DESCRIPTION("Max77620 watchdog timer driver");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
MODULE_AUTHOR("Luca Ceresoli <luca.ceresoli@bootlin.com>");

View File

@ -17,6 +17,7 @@
#include <linux/delay.h>
#include <linux/bitops.h>
#include <linux/of.h>
#include <linux/stringify.h>
#define NUM_GPIOS 6
@ -37,7 +38,7 @@ struct a21_wdt_drv {
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned int a21_wdt_get_bootstatus(struct a21_wdt_drv *drv)
{

View File

@ -11,6 +11,7 @@
#include <linux/watchdog.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/stringify.h>
#define DEVNAME "menf21bmc_wdt"
@ -28,7 +29,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct menf21bmc_wdt {
struct watchdog_device wdt;

View File

@ -8,6 +8,7 @@
#include <linux/kernel.h>
#include <linux/mcb.h>
#include <linux/module.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
struct men_z069_drv {
@ -29,7 +30,7 @@ struct men_z069_drv {
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int men_z069_wdt_start(struct watchdog_device *wdt)
{

View File

@ -11,6 +11,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -31,12 +32,12 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned int timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds="
__MODULE_STRING(DEFAULT_TIMEOUT) ")");
__stringify(DEFAULT_TIMEOUT) ")");
struct meson_gxbb_wdt {
void __iomem *reg_base;

View File

@ -15,6 +15,7 @@
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -218,7 +219,7 @@ MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Carlo Caione <carlo@caione.org>");

View File

@ -52,6 +52,7 @@
#include <linux/timer.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/stringify.h>
/*
* We have two types of cards that can be probed:
@ -107,7 +108,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static void mixcomwd_ping(void)
{

View File

@ -22,6 +22,7 @@
#include <linux/watchdog.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#include <sysdev/fsl_soc.h>
#define WATCHDOG_TIMEOUT 10
@ -57,7 +58,7 @@ static u16 timeout;
module_param(timeout, ushort, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (1<timeout<65535, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static bool reset = 1;
module_param(reset, bool, 0);
@ -67,7 +68,7 @@ MODULE_PARM_DESC(reset,
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
static void mpc8xxx_wdt_keepalive(struct mpc8xxx_wdt_ddata *ddata)
{

View File

@ -140,8 +140,8 @@ static int msc313e_wdt_probe(struct platform_device *pdev)
return PTR_ERR(priv->clk);
}
priv->wdev.info = &msc313e_wdt_ident,
priv->wdev.ops = &msc313e_wdt_ops,
priv->wdev.info = &msc313e_wdt_ident;
priv->wdev.ops = &msc313e_wdt_ops;
priv->wdev.parent = dev;
priv->wdev.min_timeout = MSC313E_WDT_MIN_TIMEOUT;
rate = clk_get_rate(priv->clk);
@ -184,7 +184,7 @@ static int msc313e_wdt_probe(struct platform_device *pdev)
return ret;
}
static int __maybe_unused msc313e_wdt_suspend(struct device *dev)
static int msc313e_wdt_suspend(struct device *dev)
{
struct msc313e_wdt_priv *priv = dev_get_drvdata(dev);
@ -194,7 +194,7 @@ static int __maybe_unused msc313e_wdt_suspend(struct device *dev)
return 0;
}
static int __maybe_unused msc313e_wdt_resume(struct device *dev)
static int msc313e_wdt_resume(struct device *dev)
{
struct msc313e_wdt_priv *priv = dev_get_drvdata(dev);
int ret = 0;
@ -208,13 +208,13 @@ static int __maybe_unused msc313e_wdt_resume(struct device *dev)
return ret;
}
static SIMPLE_DEV_PM_OPS(msc313e_wdt_pm_ops, msc313e_wdt_suspend, msc313e_wdt_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(msc313e_wdt_pm_ops, msc313e_wdt_suspend, msc313e_wdt_resume);
static struct platform_driver msc313e_wdt_driver = {
.driver = {
.name = "msc313e-wdt",
.of_match_table = msc313e_wdt_of_match,
.pm = &msc313e_wdt_pm_ops,
.pm = pm_sleep_ptr(&msc313e_wdt_pm_ops),
},
.probe = msc313e_wdt_probe,
};

View File

@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/stringify.h>
#define SYSC_RSTSTAT 0x38
#define WDT_RST_CAUSE BIT(1)
@ -41,7 +42,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static inline void rt_wdt_w32(void __iomem *base, unsigned int reg, u32 val)
{

View File

@ -12,6 +12,7 @@
#include <dt-bindings/reset/mt2712-resets.h>
#include <dt-bindings/reset/mediatek,mt6735-wdt.h>
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
#include <dt-bindings/reset/mediatek,mt8167-wdt.h>
#include <dt-bindings/reset/mt7986-resets.h>
#include <dt-bindings/reset/mt8183-resets.h>
#include <dt-bindings/reset/mt8186-resets.h>
@ -31,10 +32,12 @@
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/interrupt.h>
#include <linux/stringify.h>
#define WDT_MAX_TIMEOUT 31
#define WDT_MIN_TIMEOUT 2
#define WDT_LENGTH_TIMEOUT(n) ((n) << 5)
#define WDT_IRQ_LEVEL_SYNC_US 70
#define WDT_LENGTH 0x04
#define WDT_LENGTH_KEY 0x8
@ -49,6 +52,7 @@
#define WDT_MODE_EXRST_EN (1 << 2)
#define WDT_MODE_IRQ_EN (1 << 3)
#define WDT_MODE_AUTO_START (1 << 4)
#define WDT_MODE_IRQ_LEVEL_EN (1 << 5)
#define WDT_MODE_DUAL_EN (1 << 6)
#define WDT_MODE_CNT_SEL (1 << 8)
#define WDT_MODE_KEY 0x22000000
@ -64,6 +68,7 @@
#define DRV_NAME "mtk-wdt"
#define DRV_VERSION "1.0"
#define MT6589_TOPRGU_SW_RST_NUM 12
#define MT7988_TOPRGU_SW_RST_NUM 24
static bool nowayout = WATCHDOG_NOWAYOUT;
@ -72,22 +77,29 @@ static unsigned int timeout;
struct mtk_wdt_dev {
struct watchdog_device wdt_dev;
void __iomem *wdt_base;
spinlock_t lock; /* protects WDT_SWSYSRST reg */
spinlock_t lock; /* protects WDT_MODE and WDT_SWSYSRST reg */
struct reset_controller_dev rcdev;
bool disable_wdt_extrst;
bool reset_by_toprgu;
bool has_swsysrst_en;
const u8 *toprgu_sw_rst_tb;
int toprgu_sw_rst_num;
};
struct mtk_wdt_data {
int toprgu_sw_rst_num;
bool has_swsysrst_en;
const u8 *toprgu_sw_rst_tb;
const int toprgu_sw_rst_num;
const bool has_swsysrst_en;
};
static const struct mtk_wdt_data mt2712_data = {
.toprgu_sw_rst_num = MT2712_TOPRGU_SW_RST_NUM,
};
static const struct mtk_wdt_data mt6589_data = {
.toprgu_sw_rst_num = MT6589_TOPRGU_SW_RST_NUM,
};
static const struct mtk_wdt_data mt6735_data = {
.toprgu_sw_rst_num = MT6735_TOPRGU_RST_NUM,
};
@ -125,6 +137,29 @@ static const struct mtk_wdt_data mt8195_data = {
.toprgu_sw_rst_num = MT8195_TOPRGU_SW_RST_NUM,
};
static const u8 mt8167_toprgu_sw_rst_tb[] = {
[MT8167_TOPRGU_DDRPHY_FLASH_RST] = 0,
[MT8167_TOPRGU_AUD_PAD_RST] = 1,
[MT8167_TOPRGU_MM_RST] = 2,
[MT8167_TOPRGU_MFG_RST] = 3,
[MT8167_TOPRGU_MDSYS_RST] = 4,
[MT8167_TOPRGU_CONN_RST] = 5,
[MT8167_TOPRGU_PAD2CAM_DIG_MIPI_RX_RST] = 6,
[MT8167_TOPRGU_DIG_MIPI_TX_RST] = 7,
[MT8167_TOPRGU_SPI_PAD_MACRO_RST] = 8,
/* The data sheet describes bit 9 as "reserved, unused" */
[MT8167_TOPRGU_APMIXED_RST] = 10,
[MT8167_TOPRGU_VDEC_RST] = 11,
[MT8167_TOPRGU_CONN_MCU_RST] = 12,
[MT8167_TOPRGU_EFUSE_RST] = 13,
[MT8167_TOPRGU_PWRAP_SPICTL_RST] = 14
};
static const struct mtk_wdt_data mt8167_data = {
.toprgu_sw_rst_tb = mt8167_toprgu_sw_rst_tb,
.toprgu_sw_rst_num = ARRAY_SIZE(mt8167_toprgu_sw_rst_tb),
};
/**
* toprgu_reset_sw_en_unlocked() - enable/disable software control for reset bit
* @data: Pointer to instance of driver data.
@ -155,6 +190,15 @@ static int toprgu_reset_update(struct reset_controller_dev *rcdev,
struct mtk_wdt_dev *data =
container_of(rcdev, struct mtk_wdt_dev, rcdev);
if (data->toprgu_sw_rst_tb) {
if (id >= data->toprgu_sw_rst_num) {
dev_err(rcdev->dev, "Invalid reset ID: %lu (>=%u)\n",
id, data->toprgu_sw_rst_num);
return -EINVAL;
}
id = data->toprgu_sw_rst_tb[id];
}
spin_lock_irqsave(&data->lock, flags);
if (assert && data->has_swsysrst_en)
@ -212,8 +256,6 @@ static int toprgu_register_reset_controller(struct platform_device *pdev,
int ret;
struct mtk_wdt_dev *mtk_wdt = platform_get_drvdata(pdev);
spin_lock_init(&mtk_wdt->lock);
mtk_wdt->rcdev.owner = THIS_MODULE;
mtk_wdt->rcdev.nr_resets = rst_num;
mtk_wdt->rcdev.ops = &toprgu_reset_ops;
@ -285,29 +327,19 @@ static int mtk_wdt_set_timeout(struct watchdog_device *wdt_dev,
return 0;
}
static void mtk_wdt_init(struct watchdog_device *wdt_dev)
{
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev);
void __iomem *wdt_base;
wdt_base = mtk_wdt->wdt_base;
if (readl(wdt_base + WDT_MODE) & WDT_MODE_EN) {
set_bit(WDOG_HW_RUNNING, &wdt_dev->status);
mtk_wdt_set_timeout(wdt_dev, wdt_dev->timeout);
}
}
static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
{
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev);
void __iomem *wdt_base = mtk_wdt->wdt_base;
unsigned long flags;
u32 reg;
spin_lock_irqsave(&mtk_wdt->lock, flags);
reg = readl(wdt_base + WDT_MODE);
reg &= ~WDT_MODE_EN;
reg |= WDT_MODE_KEY;
iowrite32(reg, wdt_base + WDT_MODE);
spin_unlock_irqrestore(&mtk_wdt->lock, flags);
return 0;
}
@ -317,12 +349,14 @@ static int mtk_wdt_start(struct watchdog_device *wdt_dev)
u32 reg;
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev);
void __iomem *wdt_base = mtk_wdt->wdt_base;
unsigned long flags;
int ret;
ret = mtk_wdt_set_timeout(wdt_dev, wdt_dev->timeout);
if (ret < 0)
return ret;
spin_lock_irqsave(&mtk_wdt->lock, flags);
reg = ioread32(wdt_base + WDT_MODE);
if (wdt_dev->pretimeout)
reg |= (WDT_MODE_IRQ_EN | WDT_MODE_DUAL_EN);
@ -334,16 +368,39 @@ static int mtk_wdt_start(struct watchdog_device *wdt_dev)
reg |= WDT_MODE_CNT_SEL;
reg |= (WDT_MODE_EN | WDT_MODE_KEY);
iowrite32(reg, wdt_base + WDT_MODE);
spin_unlock_irqrestore(&mtk_wdt->lock, flags);
return 0;
}
static void mtk_wdt_init(struct watchdog_device *wdt_dev)
{
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev);
void __iomem *wdt_base;
wdt_base = mtk_wdt->wdt_base;
/*
* The bootloader may have left it in dual mode, where a timeout only
* raises the bark IRQ and the reset comes one timeout later. Apply
* this driver's mode instead, as mtk_wdt_start() does.
*/
if (readl(wdt_base + WDT_MODE) & WDT_MODE_EN) {
set_bit(WDOG_HW_RUNNING, &wdt_dev->status);
mtk_wdt_start(wdt_dev);
}
}
static int mtk_wdt_set_pretimeout(struct watchdog_device *wdd,
unsigned int timeout)
{
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdd);
void __iomem *wdt_base = mtk_wdt->wdt_base;
u32 reg = ioread32(wdt_base + WDT_MODE);
unsigned long flags;
u32 reg;
spin_lock_irqsave(&mtk_wdt->lock, flags);
reg = ioread32(wdt_base + WDT_MODE);
if (timeout && !wdd->pretimeout) {
wdd->pretimeout = wdd->timeout / 2;
@ -352,19 +409,54 @@ static int mtk_wdt_set_pretimeout(struct watchdog_device *wdd,
wdd->pretimeout = 0;
reg &= ~(WDT_MODE_IRQ_EN | WDT_MODE_DUAL_EN);
} else {
spin_unlock_irqrestore(&mtk_wdt->lock, flags);
return 0;
}
reg |= WDT_MODE_KEY;
iowrite32(reg, wdt_base + WDT_MODE);
spin_unlock_irqrestore(&mtk_wdt->lock, flags);
return mtk_wdt_set_timeout(wdd, wdd->timeout);
}
static void mtk_wdt_deassert_irq(struct watchdog_device *wdd)
{
struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdd);
void __iomem *wdt_base = mtk_wdt->wdt_base;
unsigned long flags;
u32 reg;
spin_lock_irqsave(&mtk_wdt->lock, flags);
reg = ioread32(wdt_base + WDT_MODE);
reg ^= WDT_MODE_IRQ_LEVEL_EN;
iowrite32(reg | WDT_MODE_KEY, wdt_base + WDT_MODE);
/*
* Wait for two 32 kHz watchdog clock cycles so the IRQ level
* change can propagate across the clock domain.
*/
udelay(WDT_IRQ_LEVEL_SYNC_US);
reg = ioread32(wdt_base + WDT_MODE);
reg ^= WDT_MODE_IRQ_LEVEL_EN;
iowrite32(reg | WDT_MODE_KEY, wdt_base + WDT_MODE);
/*
* Flush the posted write before releasing the lock and notifying
* the watchdog core.
*/
ioread32(wdt_base + WDT_MODE);
spin_unlock_irqrestore(&mtk_wdt->lock, flags);
}
static irqreturn_t mtk_wdt_isr(int irq, void *arg)
{
struct watchdog_device *wdd = arg;
mtk_wdt_deassert_irq(wdd);
watchdog_notify_pretimeout(wdd);
return IRQ_HANDLED;
@ -406,6 +498,8 @@ static int mtk_wdt_probe(struct platform_device *pdev)
if (!mtk_wdt)
return -ENOMEM;
spin_lock_init(&mtk_wdt->lock);
platform_set_drvdata(pdev, mtk_wdt);
mtk_wdt->wdt_base = devm_platform_ioremap_resource(pdev, 0);
@ -414,8 +508,8 @@ static int mtk_wdt_probe(struct platform_device *pdev)
irq = platform_get_irq_optional(pdev, 0);
if (irq > 0) {
err = devm_request_irq(&pdev->dev, irq, mtk_wdt_isr, 0, "wdt_bark",
&mtk_wdt->wdt_dev);
err = devm_request_irq(&pdev->dev, irq, mtk_wdt_isr, IRQF_NO_AUTOEN,
"wdt_bark", &mtk_wdt->wdt_dev);
if (err)
return err;
@ -440,6 +534,12 @@ static int mtk_wdt_probe(struct platform_device *pdev)
watchdog_set_drvdata(&mtk_wdt->wdt_dev, mtk_wdt);
mtk_wdt->disable_wdt_extrst =
of_property_read_bool(dev->of_node, "mediatek,disable-extrst");
mtk_wdt->reset_by_toprgu =
of_property_read_bool(dev->of_node, "mediatek,reset-by-toprgu");
mtk_wdt_init(&mtk_wdt->wdt_dev);
watchdog_stop_on_reboot(&mtk_wdt->wdt_dev);
@ -447,25 +547,24 @@ static int mtk_wdt_probe(struct platform_device *pdev)
if (unlikely(err))
return err;
if (irq > 0)
enable_irq(irq);
dev_info(dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)\n",
mtk_wdt->wdt_dev.timeout, nowayout);
wdt_data = of_device_get_match_data(dev);
if (wdt_data) {
mtk_wdt->toprgu_sw_rst_num = wdt_data->toprgu_sw_rst_num;
mtk_wdt->toprgu_sw_rst_tb = wdt_data->toprgu_sw_rst_tb;
mtk_wdt->has_swsysrst_en = wdt_data->has_swsysrst_en;
err = toprgu_register_reset_controller(pdev,
wdt_data->toprgu_sw_rst_num);
if (err)
return err;
mtk_wdt->has_swsysrst_en = wdt_data->has_swsysrst_en;
}
mtk_wdt->disable_wdt_extrst =
of_property_read_bool(dev->of_node, "mediatek,disable-extrst");
mtk_wdt->reset_by_toprgu =
of_property_read_bool(dev->of_node, "mediatek,reset-by-toprgu");
return 0;
}
@ -493,11 +592,12 @@ static int mtk_wdt_resume(struct device *dev)
static const struct of_device_id mtk_wdt_dt_ids[] = {
{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
{ .compatible = "mediatek,mt6589-wdt" },
{ .compatible = "mediatek,mt6589-wdt", .data = &mt6589_data },
{ .compatible = "mediatek,mt6735-wdt", .data = &mt6735_data },
{ .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data },
{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
{ .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
{ .compatible = "mediatek,mt8167-wdt", .data = &mt8167_data },
{ .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
{ .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data },
{ .compatible = "mediatek,mt8188-wdt", .data = &mt8188_data },
@ -526,7 +626,7 @@ MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Matthias Brugger <matthias.bgg@gmail.com>");

View File

@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DEVICE_NAME "nct6694-wdt"
@ -50,7 +51,7 @@ MODULE_PARM_DESC(pretimeout, "Watchdog pre-timeout in seconds");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
enum {
NCT6694_ACTION_NONE = 0,

View File

@ -9,6 +9,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define NIWD_CONTROL 0x01
@ -46,13 +47,13 @@ static unsigned int timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (default="
__MODULE_STRING(NIWD_DEFAULT_TIMEOUT) ")");
__stringify(NIWD_DEFAULT_TIMEOUT) ")");
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, S_IRUGO);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static void ni903x_start(struct ni903x_wdt *wdt)
{

View File

@ -8,6 +8,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -34,13 +35,13 @@ static unsigned int timeout;
module_param(timeout, uint, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (default="
__MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")");
__stringify(WDT_DEFAULT_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started. (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct nic7018_wdt {
u16 io_base;

View File

@ -32,6 +32,7 @@
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/stringify.h>
#include "nv_tco.h"
@ -55,12 +56,12 @@ static struct platform_device *nv_tco_platform_device;
static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (2<heartbeat<39, "
"default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
"default=" __stringify(WATCHDOG_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"
" (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
" (default=" __stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Some TCO specific functions

View File

@ -55,6 +55,7 @@
#include <linux/cpu.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/stringify.h>
#include <asm/mipsregs.h>
#include <asm/uasm.h>
@ -93,13 +94,13 @@ static int heartbeat = WD_TIMO;
module_param(heartbeat, int, 0444);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat in seconds. (0 < heartbeat, default="
__MODULE_STRING(WD_TIMO) ")");
__stringify(WD_TIMO) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0444);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static int disable;
module_param(disable, int, 0444);

View File

@ -251,7 +251,7 @@ static int xwdt_probe(struct platform_device *pdev)
* @dev: handle to the device structure.
* Return: 0 always.
*/
static int __maybe_unused xwdt_suspend(struct device *dev)
static int xwdt_suspend(struct device *dev)
{
struct xwdt_device *xdev = dev_get_drvdata(dev);
@ -267,7 +267,7 @@ static int __maybe_unused xwdt_suspend(struct device *dev)
* @dev: handle to the device structure.
* Return: 0 on success, errno otherwise.
*/
static int __maybe_unused xwdt_resume(struct device *dev)
static int xwdt_resume(struct device *dev)
{
struct xwdt_device *xdev = dev_get_drvdata(dev);
int ret = 0;
@ -278,7 +278,7 @@ static int __maybe_unused xwdt_resume(struct device *dev)
return ret;
}
static SIMPLE_DEV_PM_OPS(xwdt_pm_ops, xwdt_suspend, xwdt_resume);
static DEFINE_SIMPLE_DEV_PM_OPS(xwdt_pm_ops, xwdt_suspend, xwdt_resume);
/* Match table for of_platform binding */
static const struct of_device_id xwdt_of_match[] = {
@ -293,7 +293,7 @@ static struct platform_driver xwdt_driver = {
.driver = {
.name = WATCHDOG_NAME,
.of_match_table = xwdt_of_match,
.pm = &xwdt_pm_ops,
.pm = pm_sleep_ptr(&xwdt_pm_ops),
},
};

View File

@ -38,6 +38,7 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/stringify.h>
#include <linux/platform_data/omap-wd-timer.h>
#include "omap_wdt.h"
@ -45,7 +46,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned timer_margin;
module_param(timer_margin, uint, 0);

View File

@ -22,6 +22,7 @@
#include <linux/err.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/stringify.h>
/* RSTOUT mask register physical address for Orion5x, Kirkwood and Dove */
#define ORION_RSTOUT_MASK_OFFSET 0x20108
@ -687,7 +688,7 @@ MODULE_PARM_DESC(heartbeat, "Initial watchdog heartbeat in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:orion_wdt");

View File

@ -30,6 +30,7 @@
#include <linux/moduleparam.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
/* #define DEBUG 1 */
@ -333,7 +334,7 @@ static int pc87413_status(void)
* @ppos: pointer to the position to write. No seeks allowed
*
* A write to a watchdog device is defined as a keepalive signal. Any
* write of data will do, as we we don't define content meaning.
* write of data will do, as we don't define content meaning.
*/
static ssize_t pc87413_write(struct file *file, const char __user *data,
@ -577,15 +578,15 @@ MODULE_LICENSE("GPL");
module_param_hw(io, int, ioport, 0);
MODULE_PARM_DESC(io, MODNAME " I/O port (default: "
__MODULE_STRING(IO_DEFAULT) ").");
__stringify(IO_DEFAULT) ").");
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in minutes (default="
__MODULE_STRING(DEFAULT_TIMEOUT) ").");
__stringify(DEFAULT_TIMEOUT) ").");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");

View File

@ -72,6 +72,7 @@
#include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For inb/outb/... */
#include <linux/stringify.h> /* For __stringify */
/* Module and version information */
#define WATCHDOG_VERSION "1.20"
@ -203,13 +204,13 @@ static int heartbeat = WATCHDOG_HEARTBEAT;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "
"(2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
__stringify(WATCHDOG_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Internal functions

View File

@ -47,6 +47,7 @@
#include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For inb/outb/... */
#include <linux/stringify.h> /* For __stringify */
/* Module and version information */
#define WATCHDOG_VERSION "1.03"
@ -114,7 +115,7 @@ static unsigned long is_active;
static char expect_release;
/* this is private data for each PCI-PC watchdog card */
static struct {
/* Wether or not the card has a temperature device */
/* Whether or not the card has a temperature device */
int supports_temp;
/* The card's boot status */
int boot_status;
@ -140,12 +141,12 @@ static int heartbeat = WATCHDOG_HEARTBEAT;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "
"(0<heartbeat<65536 or 0=delay-time from dip-switches, default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
__stringify(WATCHDOG_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Internal functions

View File

@ -39,6 +39,7 @@
#include <linux/mutex.h> /* For mutex locking */
#include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/stringify.h> /* For __stringify */
/* Module and Version Information */
@ -57,12 +58,12 @@ static int heartbeat = WATCHDOG_HEARTBEAT;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. "
"(0<heartbeat<65536 or 0=delay-time from dip-switches, default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
__stringify(WATCHDOG_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/* The vendor and product id's for the USB-PC Watchdog card */
#define USB_PCWD_VENDOR_ID 0x0c98
@ -138,7 +139,7 @@ struct usb_pcwd_private {
/* true if we received a report after a command */
atomic_t cmd_received;
/* Wether or not the device exists */
/* Whether or not the device exists */
int exists;
/* locks this structure */
struct mutex mtx;

View File

@ -25,6 +25,7 @@
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/stringify.h>
#define DRV_NAME "PIKA-WDT"
@ -39,12 +40,12 @@
static int heartbeat = WDT_HEARTBEAT;
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat, "Watchdog heartbeats in seconds. "
"(default = " __MODULE_STRING(WDT_HEARTBEAT) ")");
"(default = " __stringify(WDT_HEARTBEAT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
"(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
"(default=" __stringify(WATCHDOG_NOWAYOUT) ")");
static struct {
void __iomem *fpga;

View File

@ -233,7 +233,7 @@ static int pm8916_wdt_probe(struct platform_device *pdev)
return devm_watchdog_register_device(dev, &wdt->wdev);
}
static int __maybe_unused pm8916_wdt_suspend(struct device *dev)
static int pm8916_wdt_suspend(struct device *dev)
{
struct pm8916_wdt *wdt = dev_get_drvdata(dev);
@ -243,7 +243,7 @@ static int __maybe_unused pm8916_wdt_suspend(struct device *dev)
return 0;
}
static int __maybe_unused pm8916_wdt_resume(struct device *dev)
static int pm8916_wdt_resume(struct device *dev)
{
struct pm8916_wdt *wdt = dev_get_drvdata(dev);
@ -253,7 +253,7 @@ static int __maybe_unused pm8916_wdt_resume(struct device *dev)
return 0;
}
static SIMPLE_DEV_PM_OPS(pm8916_wdt_pm_ops, pm8916_wdt_suspend,
static DEFINE_SIMPLE_DEV_PM_OPS(pm8916_wdt_pm_ops, pm8916_wdt_suspend,
pm8916_wdt_resume);
static const struct of_device_id pm8916_wdt_id_table[] = {
@ -267,7 +267,7 @@ static struct platform_driver pm8916_wdt_driver = {
.driver = {
.name = "pm8916-wdt",
.of_match_table = pm8916_wdt_id_table,
.pm = &pm8916_wdt_pm_ops,
.pm = pm_sleep_ptr(&pm8916_wdt_pm_ops),
},
};
module_platform_driver(pm8916_wdt_driver);

View File

@ -30,6 +30,7 @@
#include <linux/of.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
/* WatchDog Timer - Chapter 23 Page 207 */
@ -237,8 +238,8 @@ MODULE_DESCRIPTION("PNX4008 Watchdog Driver");
module_param(heartbeat, uint, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat period in seconds from 1 to "
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
__stringify(MAX_HEARTBEAT) ", default "
__stringify(DEFAULT_HEARTBEAT));
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,

View File

@ -10,6 +10,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/time64.h>
#include <linux/watchdog.h>
#include <asm/papr-watchdog.h>
@ -26,18 +27,18 @@ static const unsigned long pseries_wdt_action[] = {
static unsigned int action = WATCHDOG_ACTION;
module_param(action, uint, 0444);
MODULE_PARM_DESC(action, "Action taken when watchdog expires (default="
__MODULE_STRING(WATCHDOG_ACTION) ")");
__stringify(WATCHDOG_ACTION) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0444);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
#define WATCHDOG_TIMEOUT 60
static unsigned int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, uint, 0444);
MODULE_PARM_DESC(timeout, "Initial watchdog timeout in seconds (default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
struct pseries_wdt {
struct watchdog_device wd;

View File

@ -27,6 +27,7 @@
#include <linux/spinlock.h> /* For spin_lock/spin_unlock/... */
#include <linux/uaccess.h> /* For copy_to_user/put_user/... */
#include <linux/io.h> /* For devm_ioremap */
#include <linux/stringify.h> /* For __stringify */
#include <asm/mach-rc32434/integ.h> /* For the Watchdog registers */
@ -57,12 +58,12 @@ extern unsigned int idt_cpu_freq;
static int timeout = WATCHDOG_TIMEOUT;
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout value, in seconds (default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/* apply or and nand masks to data read from addr and write back */
#define SET_BITS(addr, or, nand) \

View File

@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/smp.h>
#include <linux/stringify.h>
#include <linux/sys_soc.h>
#include <linux/watchdog.h>
@ -44,7 +45,7 @@ static const unsigned int clk_divs[] = { 1, 4, 16, 32, 64, 128, 1024, 4096 };
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct rwdt_priv {
void __iomem *base;

View File

@ -9,6 +9,7 @@
#include <linux/mfd/rn5t618.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRIVER_NAME "rn5t618-wdt"
@ -21,7 +22,7 @@ MODULE_PARM_DESC(timeout, "Initial watchdog timeout in seconds");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
struct rn5t618_wdt {
struct watchdog_device wdt_dev;

View File

@ -15,6 +15,7 @@
#include <linux/watchdog.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <asm/mach-ralink/ralink_regs.h>
@ -51,7 +52,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static inline void rt_wdt_w32(void __iomem *base, unsigned int reg, u32 val)
{

View File

@ -17,6 +17,7 @@
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/watchdog.h>
@ -414,8 +415,8 @@ MODULE_DESCRIPTION("K3 RTI Watchdog Driver");
module_param(heartbeat, int, 0);
MODULE_PARM_DESC(heartbeat,
"Watchdog heartbeat period in seconds from 1 to "
__MODULE_STRING(MAX_HEARTBEAT) ", default "
__MODULE_STRING(DEFAULT_HEARTBEAT));
__stringify(MAX_HEARTBEAT) ", default "
__stringify(DEFAULT_HEARTBEAT));
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:rti-wdt");

View File

@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/stringify.h>
#include <linux/reset.h>
#include <linux/units.h>
#include <linux/watchdog.h>
@ -41,7 +42,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
enum rz_wdt_type {
WDT_RZG2L,

View File

@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/stringify.h>
#include <linux/units.h>
#include <linux/watchdog.h>
@ -48,7 +49,7 @@
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
enum rzv2h_wdt_count_source {
COUNT_SOURCE_LOCO,

View File

@ -13,6 +13,7 @@
#include <linux/moduleparam.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#define DRIVER_NAME "s32g-swt"
@ -42,12 +43,12 @@ struct s32g_wdt_device {
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static unsigned int timeout_param = S32G_WDT_DEFAULT_TIMEOUT;
module_param(timeout_param, uint, 0);
MODULE_PARM_DESC(timeout_param, "Watchdog timeout in seconds (default="
__MODULE_STRING(S32G_WDT_DEFAULT_TIMEOUT) ")");
__stringify(S32G_WDT_DEFAULT_TIMEOUT) ")");
static bool early_enable;
module_param(early_enable, bool, 0);

View File

@ -28,6 +28,7 @@
#include <linux/regmap.h>
#include <linux/delay.h>
#include <linux/math64.h>
#include <linux/stringify.h>
#define S3C2410_WTCON 0x00
#define S3C2410_WTDAT 0x04
@ -154,12 +155,12 @@ module_param(nowayout, bool, 0);
module_param(soft_noboot, int, 0);
MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. (default="
__MODULE_STRING(S3C2410_WATCHDOG_DEFAULT_TIME) ")");
__stringify(S3C2410_WATCHDOG_DEFAULT_TIME) ")");
MODULE_PARM_DESC(tmr_atboot,
"Watchdog is started at boot time if set to 1, default="
__MODULE_STRING(S3C2410_WATCHDOG_ATBOOT));
__stringify(S3C2410_WATCHDOG_ATBOOT));
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default 0)");
/**
@ -232,6 +233,20 @@ static const struct s3c2410_wdt_variant drv_data_exynos5420 = {
QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_AUTO_DISABLE,
};
/*
* Unlike similar SoCs like GS101, Exynos5515's PMU does not require
* explicit counter enablement. Hence, QUIRK_HAS_PMU_CNT_EN is not set.
*/
static const struct s3c2410_wdt_variant drv_data_exynos5515 = {
.mask_reset_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN,
.mask_bit = 2,
.mask_reset_inv = true,
.rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET,
.rst_stat_bit = 24,
.quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET | \
QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_DBGACK_BIT,
};
static const struct s3c2410_wdt_variant drv_data_exynos7 = {
.disable_reg = EXYNOS5_WDT_DISABLE_REG_OFFSET,
.mask_reset_reg = EXYNOS5_WDT_MASK_RESET_REG_OFFSET,
@ -379,6 +394,8 @@ static const struct of_device_id s3c2410_wdt_match[] = {
.data = &drv_data_exynos5250 },
{ .compatible = "samsung,exynos5420-wdt",
.data = &drv_data_exynos5420 },
{ .compatible = "samsung,exynos5515-wdt",
.data = &drv_data_exynos5515 },
{ .compatible = "samsung,exynos7-wdt",
.data = &drv_data_exynos7 },
{ .compatible = "samsung,exynos850-wdt",

View File

@ -14,6 +14,7 @@
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/stringify.h>
#include <linux/watchdog.h>
#include "at91sam9_wdt.h"
@ -42,12 +43,12 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(wdt_timeout, int, 0);
MODULE_PARM_DESC(wdt_timeout,
"Watchdog timeout in seconds. (default = "
__MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")");
__stringify(WDT_DEFAULT_TIMEOUT) ")");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static inline bool wdt_enabled(struct sama5d4_wdt *wdt)
{

View File

@ -58,6 +58,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
#define OUR_NAME "sbc60xxwdt"
@ -98,13 +99,13 @@ static int timeout = WATCHDOG_TIMEOUT; /* in seconds, multiplied by HZ to
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (1<=timeout<=3600, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
__stringify(WATCHDOG_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
static void wdt_timer_ping(struct timer_list *);
static DEFINE_TIMER(timer, wdt_timer_ping);

View File

@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/atomic.h>
#include <linux/stringify.h>
#define SBC7240_ENABLE_PORT 0x443
#define SBC7240_DISABLE_PORT 0x043
@ -34,8 +35,8 @@
static int timeout = SBC7240_TIMEOUT; /* in seconds */
module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<="
__MODULE_STRING(SBC7240_MAX_TIMEOUT) ", default="
__MODULE_STRING(SBC7240_TIMEOUT) ")");
__stringify(SBC7240_MAX_TIMEOUT) ", default="
__stringify(SBC7240_TIMEOUT) ")");
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);

View File

@ -48,6 +48,7 @@
#include <linux/moduleparam.h>
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/stringify.h>
static unsigned long sbc8360_is_open;
@ -199,7 +200,7 @@ MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))");
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
__stringify(WATCHDOG_NOWAYOUT) ")");
/*
* Kernel methods.

Some files were not shown because too many files have changed in this diff Show More