From 5f465afe43cb29f7b5ebbd160164267f55ce365d Mon Sep 17 00:00:00 2001 From: Christoph Berliner Date: Fri, 21 Aug 2026 16:25:11 +0200 Subject: [PATCH 01/22] watchdog: sp5100_tco: allow unreserved MMIO on GA-78LMT-USB3 The Gigabyte GA-78LMT-USB3 firmware programs the legacy SP5100 watchdog MMIO window at 0xfec000f0. This address falls inside the IOAPIC resource, so sp5100_tco fails to reserve it and aborts probing. Do not relocate or reprogram the watchdog. Instead, add a narrowly scoped DMI quirk for this board which permits use of the firmware-provided MMIO address without reserving it. The exception is limited to the legacy SP5100 register layout, the GA-78LMT-USB3 DMI identity, and the firmware address 0xfec000f0. All other systems retain the existing resource reservation behavior. On the affected system the watchdog initializes successfully and /dev/watchdog0 is registered while the firmware-programmed watchdog base remains unchanged at 0xfec000f0 during load and unload. Tested on a Gigabyte GA-78LMT-USB3 with AMD SBx00 SMBus controller (PCI 1002:4385, revision 0x3c). Signed-off-by: Christoph Berliner Link: https://patch.msgid.link/20260821142511.49934-1-caberliner@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/sp5100_tco.c | 61 ++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c index 72ad59649ccc..efa682f3a181 100644 --- a/drivers/watchdog/sp5100_tco.c +++ b/drivers/watchdog/sp5100_tco.c @@ -33,6 +33,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include +#include #include #include #include @@ -240,6 +241,35 @@ static u32 sp5100_tco_read_pm_reg32(u8 index) return val; } +/* + * The Gigabyte GA-78LMT-USB3 firmware programs the legacy SP5100 watchdog + * MMIO window at 0xfec000f0. This address lies inside the IOAPIC resource, + * so the generic resource reservation fails even though firmware explicitly + * assigns the watchdog to this address. + * + * Keep this exception narrowly scoped to the affected system and firmware + * address. Do not relocate or otherwise reprogram the watchdog. + */ +#define SP5100_WDT_GA78LMT_MMIO 0xfec000f0 + +static const struct dmi_system_id sp5100_tco_unreserved_mmio_dmi[] = { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Gigabyte Technology Co., Ltd."), + DMI_MATCH(DMI_PRODUCT_NAME, "GA-78LMT-USB3"), + }, + }, + {} +}; + +static bool sp5100_tco_allow_unreserved_mmio(struct sp5100_tco *tco, + u32 mmio_addr) +{ + return tco->tco_reg_layout == sp5100 && + mmio_addr == SP5100_WDT_GA78LMT_MMIO && + dmi_check_system(sp5100_tco_unreserved_mmio_dmi); +} + static u32 sp5100_tco_request_region(struct device *dev, u32 mmio_addr, const char *dev_name) @@ -259,6 +289,7 @@ static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco, const char *dev_name) { struct device *dev = tco->wdd.parent; + bool reserved = false; dev_dbg(dev, "Got 0x%08x from SBResource_MMIO register\n", mmio_addr); @@ -266,11 +297,29 @@ static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco, return -ENODEV; /* Check for MMIO address and alternate MMIO address conflicts */ - if (mmio_addr) - mmio_addr = sp5100_tco_request_region(dev, mmio_addr, dev_name); + if (mmio_addr) { + u32 requested_addr; - if (!mmio_addr && alt_mmio_addr) - mmio_addr = sp5100_tco_request_region(dev, alt_mmio_addr, dev_name); + requested_addr = sp5100_tco_request_region(dev, mmio_addr, + dev_name); + if (requested_addr) { + mmio_addr = requested_addr; + reserved = true; + } else if (sp5100_tco_allow_unreserved_mmio(tco, mmio_addr)) { + dev_info(dev, + "Using firmware watchdog MMIO 0x%08x without reserving it\n", + mmio_addr); + } else { + mmio_addr = 0; + } + } + + if (!mmio_addr && alt_mmio_addr) { + mmio_addr = sp5100_tco_request_region(dev, alt_mmio_addr, + dev_name); + if (mmio_addr) + reserved = true; + } if (!mmio_addr) { dev_err(dev, "Failed to reserve MMIO or alternate MMIO region\n"); @@ -280,7 +329,9 @@ static u32 sp5100_tco_prepare_base(struct sp5100_tco *tco, tco->tcobase = devm_ioremap(dev, mmio_addr, SP5100_WDT_MEM_MAP_SIZE); if (!tco->tcobase) { dev_err(dev, "MMIO address 0x%08x failed mapping\n", mmio_addr); - devm_release_mem_region(dev, mmio_addr, SP5100_WDT_MEM_MAP_SIZE); + if (reserved) + devm_release_mem_region(dev, mmio_addr, + SP5100_WDT_MEM_MAP_SIZE); return -ENOMEM; } From 1376a013a1dfa3c1821e130df6f7660abf86a6bb Mon Sep 17 00:00:00 2001 From: Zexin Wang Date: Mon, 17 Aug 2026 10:37:49 +0800 Subject: [PATCH 02/22] watchdog: sbsa_gwdt: add early_enable module parameter On SBSA platforms using standard UEFI firmware (such as EDK II), the watchdog timer is often enabled during early boot stages but explicitly disabled by the firmware before handing over control to the OS (e.g., during ExitBootServices). This is done to prevent unintended resets while the OS is loading, assuming the OS watchdog driver will take over. However, this leaves a protection gap. If the system hangs between the firmware handover and the userspace watchdog daemon startup, the hardware watchdog will not fire to recover the system. For safety-critical systems that require continuous hardware watchdog protection from the earliest possible moment, this gap is problematic. Add an 'early_enable' module parameter to allow the kernel driver to re-enable the watchdog immediately during probe if it was left disabled by the firmware. By setting the WDOG_HW_RUNNING status bit, the watchdog core is instructed that the hardware is active. As a result, the core's pre-userspace handler (controlled by 'handle_boot_enabled') will automatically issue periodic keepalives until userspace opens the device. This bridges the protection gap seamlessly without requiring firmware modifications and without risking unintended resets during kernel boot. The parameter defaults to false to preserve the traditional behavior. Signed-off-by: Zexin Wang Link: https://patch.msgid.link/20260817023838.6459-1-ot_zexin.wang@mediatek.com Signed-off-by: Guenter Roeck --- .../watchdog/watchdog-parameters.rst | 2 ++ drivers/watchdog/sbsa_gwdt.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Documentation/watchdog/watchdog-parameters.rst b/Documentation/watchdog/watchdog-parameters.rst index 502cb6adbeda..348229ffcb43 100644 --- a/Documentation/watchdog/watchdog-parameters.rst +++ b/Documentation/watchdog/watchdog-parameters.rst @@ -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) ------------------------------------------------- diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index e04d42cc7774..3c5bfd8641c6 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -122,6 +122,11 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +static bool early_enable; +module_param(early_enable, bool, 0); +MODULE_PARM_DESC(early_enable, + "Watchdog is started on module insertion (default=0)"); + /* * Arm Base System Architecture 1.0 introduces watchdog v1 which * increases the length watchdog offset register to 48 bits. @@ -296,6 +301,7 @@ static int sbsa_gwdt_probe(struct platform_device *pdev) struct sbsa_gwdt *gwdt; int ret, irq; u32 status; + bool early_action; gwdt = devm_kzalloc(dev, sizeof(*gwdt), GFP_KERNEL); if (!gwdt) @@ -386,14 +392,23 @@ static int sbsa_gwdt_probe(struct platform_device *pdev) */ sbsa_gwdt_set_timeout(wdd, wdd->timeout); + early_action = early_enable && !(status & SBSA_GWDT_WCS_EN); + if (early_action) { + sbsa_gwdt_start(wdd); + set_bit(WDOG_HW_RUNNING, &wdd->status); + } + watchdog_stop_on_reboot(wdd); ret = devm_watchdog_register_device(dev, wdd); - if (ret) + if (ret) { + if (early_action) + sbsa_gwdt_stop(wdd); return ret; + } dev_info(dev, "Initialized with %ds timeout @ %u Hz, action=%d.%s\n", wdd->timeout, gwdt->clk, action, - status & SBSA_GWDT_WCS_EN ? " [enabled]" : ""); + watchdog_hw_running(wdd) ? " [enabled]" : ""); return 0; } From 030b5022c15d3fc1acddf4fc2202a64298856dc7 Mon Sep 17 00:00:00 2001 From: Aiden Isik Date: Fri, 21 Aug 2026 16:14:49 +0100 Subject: [PATCH 03/22] dt-bindings: watchdog: samsung-wdt: Add exynos5515-wdt compatible Add a dt-binding compatible for the Exynos5515 watchdog timer. This watchdog requires a syscon phandle, and the cluster index should *not* be specified, as that does not make sense on the Exynos5515 SoC (due to it only having a single core cluster). Signed-off-by: Aiden Isik Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260821-for-next-lucky7-watchdog-v4-1-d070cee5009f@member.fsf.org Signed-off-by: Guenter Roeck --- .../bindings/watchdog/samsung-wdt.yaml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml index 41aee1655b0c..a32c47831577 100644 --- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.yaml @@ -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: From 517ba35dc7d49d7e013bf3c1ad960253906ef22c Mon Sep 17 00:00:00 2001 From: Aiden Isik Date: Fri, 21 Aug 2026 16:14:50 +0100 Subject: [PATCH 04/22] watchdog: s3c2410_wdt: Add exynos5515-wdt compatible data Add driver data for the Exynos5515 SoC's watchdog timer. Unlike similar SoCs such as GS101 or Exynos990, Exynos5515's PMU does not require explicit counter enablement for the watchdog to tick. Signed-off-by: Aiden Isik Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260821-for-next-lucky7-watchdog-v4-2-d070cee5009f@member.fsf.org Signed-off-by: Guenter Roeck --- drivers/watchdog/s3c2410_wdt.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index e31f93db0509..e61439a3f4b2 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -232,6 +232,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 +393,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", From 311f6c4bba24651dc79ee58ddb1e507083ef0a7b Mon Sep 17 00:00:00 2001 From: Wanming Gao Date: Thu, 27 Aug 2026 17:26:12 +0800 Subject: [PATCH 05/22] watchdog: mediatek: acknowledge pretimeout interrupt The MediaTek watchdog pretimeout interrupt is level-triggered and does not have a separate acknowledge register. The interrupt is cleared by changing WDT_MODE_IRQ_LEVEL_EN and then restoring it to its original state. Without this transition, the interrupt may remain asserted and cause an interrupt storm. After changing WDT_MODE_IRQ_LEVEL_EN, wait 70 us before restoring it. This is longer than two 32 kHz watchdog clock cycles, allowing the level change to propagate across the clock domain. WDT_MODE is also updated by the watchdog start, stop, and pretimeout operations. Protect its read-modify-write sequences and the complete IRQ acknowledge sequence with the watchdog spinlock so that concurrent updates cannot overwrite the temporary IRQ level state. Signed-off-by: Wanming Gao Tested-by: Tzung-Bi Shih Reviewed-by: Tzung-Bi Shih Link: https://patch.msgid.link/20260827092616.2724197-1-wanming.gao@mediatek.com Signed-off-by: Guenter Roeck --- drivers/watchdog/mtk_wdt.c | 62 ++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index d9c30e4c80e3..ddc4d2ff9d9f 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -35,6 +35,7 @@ #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 +50,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 @@ -72,7 +74,7 @@ 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; @@ -212,8 +214,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; @@ -302,12 +302,15 @@ 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 +320,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,6 +339,7 @@ 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; } @@ -343,7 +349,11 @@ static int mtk_wdt_set_pretimeout(struct watchdog_device *wdd, { 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 +362,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 +451,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 +461,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; @@ -447,6 +494,9 @@ 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); From fb660c11cefb578715a2d2461aad9e4cc94ebe4c Mon Sep 17 00:00:00 2001 From: Lad Prabhakar Date: Mon, 17 Aug 2026 20:25:37 +0100 Subject: [PATCH 06/22] dt-bindings: watchdog: renesas,r9a09g057-wdt: Add CPG/MSSR syscon support On the Renesas RZ/T2H SoC, the Watchdog Timer Control Register (WDTDCR) resides within the CPG/MSSR block rather than the WDT address space itself. Previously, this was handled by including a second register range in the "reg" property. However, this is architecturally incorrect as the CPG/MSSR block consists of two distinct regions (0x80280000 and 0x81280000) that contain registers for multiple peripheral blocks. Since the CPG/MSSR block is a multi-function block, introduce the "renesas,sysc" phandle-array property to allow the WDT driver to access its control register via this shared regmap. Mark the use of a second "reg" entry as deprecated in favor of the new phandle-array approach for SoCs that require WDTDCR access. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring (Arm) Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260817192540.423994-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Guenter Roeck --- .../watchdog/renesas,r9a09g057-wdt.yaml | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml index 975c5aa4d747..322b6921c147 100644 --- a/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/renesas,r9a09g057-wdt.yaml @@ -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 From 7b08904eb388d942fed86adf4f5edaaed554e814 Mon Sep 17 00:00:00 2001 From: Charles Haithcock Date: Tue, 1 Sep 2026 15:42:49 -0600 Subject: [PATCH 07/22] watchdog: Differentiate scenarios when watchdog is closed Presently, when a watchdog device is closed, we print "watchdog did not stop" in a few different scenarios; 1. When nowayout is set 2. When the watchdog is able to close, has received the magic character to stop, but fails to close in device-specific code paths 3. When userspace deliberately closes it without stopping it For 1, we explicitly print we can not close because of nowayout. Nothing differentiates the other two however. This change adds a print to indicate the watchdog was closed while still running. Suggested-by: Guenter Roeck Signed-off-by: Charles Haithcock Link: https://patch.msgid.link/20260901214251.760184-1-chaithco@redhat.com [groeck: Fixed multi-line alignment] Signed-off-by: Guenter Roeck --- drivers/watchdog/watchdog_dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index d7895009a2de..d8ed77d8a220 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -305,6 +305,10 @@ static int watchdog_stop(struct watchdog_device *wdd) if (wdd->ops->stop) { clear_bit(WDOG_HW_RUNNING, &wdd->status); err = wdd->ops->stop(wdd); + if (err < 0) { + pr_err("watchdog%d: Failed to stop watchdog: %pe\n", + wdd->id, ERR_PTR(err)); + } trace_watchdog_stop(wdd, err); } else { set_bit(WDOG_HW_RUNNING, &wdd->status); From 70a1eeef55a1bc4cbe63ad239e9f62e53f0f1987 Mon Sep 17 00:00:00 2001 From: Zakariya Hadrami Date: Wed, 9 Sep 2026 21:38:00 +0200 Subject: [PATCH 08/22] dt-bindings: watchdog: mediatek: Add MT8127 Add entry for MT8127 SoC's watchdog which is compatible with MT6589's one. Acked-by: Krzysztof Kozlowski Signed-off-by: Zakariya Hadrami Link: https://patch.msgid.link/20260909-mt8127-amazon-ford-basic-v4-1-e9af5c420ab1@mailbox.org Signed-off-by: Guenter Roeck --- Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml index 953629cb9558..e6e4546da0aa 100644 --- a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml @@ -40,6 +40,7 @@ properties: - mediatek,mt7622-wdt - mediatek,mt7623-wdt - mediatek,mt7629-wdt + - mediatek,mt8127-wdt - mediatek,mt8173-wdt - mediatek,mt8188-wdt - mediatek,mt8189-wdt From 5402b0f9aa32fa8e1cd61b4a4cc4c693dcdaa316 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 9 Sep 2026 13:15:33 +0200 Subject: [PATCH 09/22] watchdog: i6300esb: do not stop an already running watchdog esb_initdevice() unconditionally disabled the WDT, stopping a watchdog that firmware had left running instead of taking over its care. Detect the enable bit in the lock register, set WDOG_HW_RUNNING like the other watchdog drivers do, and simply reset the timeout to the configured value. Assisted-by: opencode:Qwen3.8-27B Signed-off-by: Jan Kiszka Link: https://patch.msgid.link/ea413e5d-9f37-46b8-8d93-863aa065a784@siemens.com Signed-off-by: Guenter Roeck --- drivers/watchdog/i6300esb.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index a30835f547b3..13daafe05c43 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c @@ -264,13 +264,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 +309,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; From 8ae98afe6d902f94f32fe88b58299ab33381cd91 Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Fri, 4 Sep 2026 17:07:40 +0530 Subject: [PATCH 10/22] watchdog: fix typos in comments Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam Link: https://patch.msgid.link/20260904113744.19872-2-hemanth.selam@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/davinci_wdt.c | 2 +- drivers/watchdog/max63xx_wdt.c | 2 +- drivers/watchdog/pcwd_pci.c | 2 +- drivers/watchdog/pcwd_usb.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 6ea0434f45c2..748dd24affb3 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -120,7 +120,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; diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index e9073df1a7de..0aecf411f91b 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c @@ -64,7 +64,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 */ diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c index a489b426f2ba..80fc4e6d3b0a 100644 --- a/drivers/watchdog/pcwd_pci.c +++ b/drivers/watchdog/pcwd_pci.c @@ -114,7 +114,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; diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index d7c18c990649..b923fdaaa198 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c @@ -138,7 +138,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; From 3280102fc71b134636d49ccacaac93a71d155749 Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Fri, 4 Sep 2026 17:07:41 +0530 Subject: [PATCH 11/22] watchdog: fix repeated words in comments Drop words accidentally written twice, reported by checkpatch.pl as a possible repeated word. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam Link: https://patch.msgid.link/20260904113744.19872-3-hemanth.selam@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/pc87413_wdt.c | 2 +- drivers/watchdog/wdt.c | 4 ++-- drivers/watchdog/wdt977.c | 2 +- drivers/watchdog/wdt_pci.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index fbf835d112b8..7c17f9eb1f8a 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c @@ -333,7 +333,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, diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c index 3980d60bacd8..86aedaec1fef 100644 --- a/drivers/watchdog/wdt.c +++ b/drivers/watchdog/wdt.c @@ -311,7 +311,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) * @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 wdt_write(struct file *file, const char __user *buf, @@ -406,7 +406,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) * open and on opening we load the counters. Counter zero is a 100Hz * cascade, into counter 1 which downcounts to reboot. When the counter * triggers counter 2 downcounts the length of the reset pulse which - * set set to be as long as possible. + * set to be as long as possible. */ static int wdt_open(struct inode *inode, struct file *file) diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c index 4f449ac4dda4..1627b589d817 100644 --- a/drivers/watchdog/wdt977.c +++ b/drivers/watchdog/wdt977.c @@ -298,7 +298,7 @@ static int wdt977_release(struct inode *inode, struct file *file) * @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 wdt977_write(struct file *file, const char __user *buf, diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 3918a600f2a0..3468c831d90a 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c @@ -347,7 +347,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) * @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 wdtpci_write(struct file *file, const char __user *buf, @@ -443,7 +443,7 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd, * open and on opening we load the counters. Counter zero is a 100Hz * cascade, into counter 1 which downcounts to reboot. When the counter * triggers counter 2 downcounts the length of the reset pulse which - * set set to be as long as possible. + * set to be as long as possible. */ static int wdtpci_open(struct inode *inode, struct file *file) From 6b8ca7edac212e68caa32042afb14f5c9d4c6d4b Mon Sep 17 00:00:00 2001 From: Li Jun Date: Tue, 8 Sep 2026 18:49:05 +0800 Subject: [PATCH 12/22] watchdog: sp805: Replace SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS Replace the deprecated SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS. This also drops the __maybe_unused annotations on the suspend/resume callbacks, since pm_sleep_ptr() inside the new macro already handles the case where CONFIG_PM_SLEEP is disabled. Additionally, wrap the &sp805_wdt_dev_pm_ops assignment with pm_sleep_ptr() so the entire dev_pm_ops structure is dropped when CONFIG_PM_SLEEP is disabled, instead of leaving it as a dead struct with NULL callbacks. Signed-off-by: Li Jun Link: https://patch.msgid.link/20260908104905.3388262-1-lijun01@kylinos.cn Signed-off-by: Guenter Roeck --- drivers/watchdog/sp805_wdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index c2125f204a13..7b01011a5bc8 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -321,7 +321,7 @@ static void sp805_wdt_remove(struct amba_device *adev) watchdog_set_drvdata(&wdt->wdd, NULL); } -static int __maybe_unused sp805_wdt_suspend(struct device *dev) +static int sp805_wdt_suspend(struct device *dev) { struct sp805_wdt *wdt = dev_get_drvdata(dev); @@ -331,7 +331,7 @@ static int __maybe_unused sp805_wdt_suspend(struct device *dev) return 0; } -static int __maybe_unused sp805_wdt_resume(struct device *dev) +static int sp805_wdt_resume(struct device *dev) { struct sp805_wdt *wdt = dev_get_drvdata(dev); @@ -341,7 +341,7 @@ static int __maybe_unused sp805_wdt_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend, +static DEFINE_SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend, sp805_wdt_resume); static const struct amba_id sp805_wdt_ids[] = { @@ -361,7 +361,7 @@ MODULE_DEVICE_TABLE(amba, sp805_wdt_ids); static struct amba_driver sp805_wdt_driver = { .drv = { .name = MODULE_NAME, - .pm = &sp805_wdt_dev_pm_ops, + .pm = pm_sleep_ptr(&sp805_wdt_dev_pm_ops), }, .id_table = sp805_wdt_ids, .probe = sp805_wdt_probe, From 7c0fd67f930fb8e14c6f4d87dafc6f497da7da13 Mon Sep 17 00:00:00 2001 From: Tzung-Bi Shih Date: Sat, 29 Aug 2026 00:13:48 +0800 Subject: [PATCH 13/22] watchdog: msc313e: Replace commas with semicolons in probe() Replace commas at the end of statements with semicolons in probe(). Signed-off-by: Tzung-Bi Shih Link: https://patch.msgid.link/20260828161348.13212-10-tzungbi@kernel.org Signed-off-by: Guenter Roeck --- drivers/watchdog/msc313e_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/msc313e_wdt.c b/drivers/watchdog/msc313e_wdt.c index d62586f6e09d..53bdbfda4e3e 100644 --- a/drivers/watchdog/msc313e_wdt.c +++ b/drivers/watchdog/msc313e_wdt.c @@ -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); From f12d5facded74f001a51ad3f0cf3241d204c41ba Mon Sep 17 00:00:00 2001 From: Luca Leonardo Scorcia Date: Tue, 8 Sep 2026 19:38:28 +0200 Subject: [PATCH 14/22] watchdog: mediatek: Add wdt/toprgu resets for mt6589 According to Android sources, mt6589 has 12 reset bits in the WDT_SWSYSRST register. Populate toprgu_sw_rst_num to allow toprgu resets in device trees of the many compatible devices. Signed-off-by: Luca Leonardo Scorcia Link: https://patch.msgid.link/20260908174259.9009-2-l.scorcia@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/mtk_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index ddc4d2ff9d9f..cb7ec07c8e3d 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -66,6 +66,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; @@ -90,6 +91,10 @@ 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, }; @@ -543,7 +548,7 @@ 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 }, From 17908f89973510e8af7db8a53d3f3df484651c5b Mon Sep 17 00:00:00 2001 From: Li Jun Date: Thu, 10 Sep 2026 20:47:30 +0800 Subject: [PATCH 15/22] watchdog: PM: use DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr for dev_pm_ops Replace the deprecated SIMPLE_DEV_PM_OPS with DEFINE_SIMPLE_DEV_PM_OPS. This also drops the __maybe_unused annotations on the suspend/resume callbacks, since pm_sleep_ptr() inside the new macro already handles the case where CONFIG_PM_SLEEP is disabled. Wrap the dev_pm_ops assignment with pm_sleep_ptr() so the entire dev_pm_ops structure is dropped when CONFIG_PM_SLEEP is disabled, instead of leaving it as a dead struct with NULL callbacks. Signed-off-by: Li Jun Link: https://patch.msgid.link/20260910124730.1127847-1-lijun01@kylinos.cn Signed-off-by: Guenter Roeck --- drivers/watchdog/cadence_wdt.c | 8 ++++---- drivers/watchdog/da9062_wdt.c | 8 ++++---- drivers/watchdog/keembay_wdt.c | 8 ++++---- drivers/watchdog/msc313e_wdt.c | 8 ++++---- drivers/watchdog/of_xilinx_wdt.c | 8 ++++---- drivers/watchdog/pm8916_wdt.c | 8 ++++---- drivers/watchdog/stmp3xxx_rtc_wdt.c | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c index ad46b33ce5f2..ba2efccef467 100644 --- a/drivers/watchdog/cadence_wdt.c +++ b/drivers/watchdog/cadence_wdt.c @@ -359,7 +359,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 +377,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 +394,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 +408,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), }, }; diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c index 4d558652e9e7..3d7bf2f351db 100644 --- a/drivers/watchdog/da9062_wdt.c +++ b/drivers/watchdog/da9062_wdt.c @@ -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, }, }; diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index 7c8e53921e40..20b9eb6a2727 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -250,7 +250,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 +260,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 +270,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 +284,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), }, }; diff --git a/drivers/watchdog/msc313e_wdt.c b/drivers/watchdog/msc313e_wdt.c index 53bdbfda4e3e..0a68be7a217b 100644 --- a/drivers/watchdog/msc313e_wdt.c +++ b/drivers/watchdog/msc313e_wdt.c @@ -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, }; diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 352853e6fe71..d6b1adfe31d1 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -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), }, }; diff --git a/drivers/watchdog/pm8916_wdt.c b/drivers/watchdog/pm8916_wdt.c index 007ed139ab96..a7ae57fb2453 100644 --- a/drivers/watchdog/pm8916_wdt.c +++ b/drivers/watchdog/pm8916_wdt.c @@ -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); diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c index 060447101f48..958e68746f8e 100644 --- a/drivers/watchdog/stmp3xxx_rtc_wdt.c +++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c @@ -114,7 +114,7 @@ static void stmp3xxx_wdt_remove(struct platform_device *pdev) unregister_reboot_notifier(&wdt_notifier); } -static int __maybe_unused stmp3xxx_wdt_suspend(struct device *dev) +static int stmp3xxx_wdt_suspend(struct device *dev) { struct watchdog_device *wdd = &stmp3xxx_wdd; @@ -124,7 +124,7 @@ static int __maybe_unused stmp3xxx_wdt_suspend(struct device *dev) return 0; } -static int __maybe_unused stmp3xxx_wdt_resume(struct device *dev) +static int stmp3xxx_wdt_resume(struct device *dev) { struct watchdog_device *wdd = &stmp3xxx_wdd; @@ -134,13 +134,13 @@ static int __maybe_unused stmp3xxx_wdt_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(stmp3xxx_wdt_pm_ops, +static DEFINE_SIMPLE_DEV_PM_OPS(stmp3xxx_wdt_pm_ops, stmp3xxx_wdt_suspend, stmp3xxx_wdt_resume); static struct platform_driver stmp3xxx_wdt_driver = { .driver = { .name = "stmp3xxx_rtc_wdt", - .pm = &stmp3xxx_wdt_pm_ops, + .pm = pm_sleep_ptr(&stmp3xxx_wdt_pm_ops), }, .probe = stmp3xxx_wdt_probe, .remove = stmp3xxx_wdt_remove, From 1c81d4a5cda2381dd764e418bdf5d15fbe62b588 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Fri, 11 Sep 2026 11:05:31 +0800 Subject: [PATCH 16/22] watchdog: sp805_wdt: fix suspend/resume handling of HW_RUNNING watchdog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sp805_wdt_suspend() and sp805_wdt_resume() only check watchdog_active(), when the watchdog is left running by the driver sets WDOG_HW_RUNNING in sp805_wdt_probe() but userspace never opens the device, so WDOG_ACTIVE remains cleared, the wdt_disable() will not be executed in sp805_wdt_suspend. In this case, the suspend callback is a no-op and the watchdog keeps counting during system suspend, leading to an unexpected system reset. Check WDOG_HW_RUNNING and wdt->wdd,can fix this issue. Signed-off-by: Li Jun Link: https://patch.msgid.link/20260911030531.837140-1-lijun01@kylinos.cn Signed-off-by: Guenter Roeck --- drivers/watchdog/sp805_wdt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 7b01011a5bc8..925f12157181 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -325,7 +325,8 @@ static int sp805_wdt_suspend(struct device *dev) { struct sp805_wdt *wdt = dev_get_drvdata(dev); - if (watchdog_active(&wdt->wdd)) + if (watchdog_active(&wdt->wdd) || + watchdog_hw_running(&wdt->wdd)) return wdt_disable(&wdt->wdd); return 0; @@ -335,7 +336,8 @@ static int sp805_wdt_resume(struct device *dev) { struct sp805_wdt *wdt = dev_get_drvdata(dev); - if (watchdog_active(&wdt->wdd)) + if (watchdog_active(&wdt->wdd) || + watchdog_hw_running(&wdt->wdd)) return wdt_enable(&wdt->wdd); return 0; From 2c3e4e818c9cc9b41146b660bfe72a5a3eea207d Mon Sep 17 00:00:00 2001 From: Luca Leonardo Scorcia Date: Tue, 8 Sep 2026 19:38:30 +0200 Subject: [PATCH 17/22] dt-bindings: watchdog: Add compatible for MediaTek mt8167 Currently mt8167 inherits its watchdog from the included mt8516 dtsi, which in turn falls back on mt6589-wdt. However according to the data sheet mt8167 toprgu is not actually compatible with mt6589 (it has 14 sw resets instead of 12, and its reset bit map table is different from mt6589). Update the mtk-wdt binding to add a dedicated compatible for mt8167 and add the IDs that can be used in device trees to identify subsystem resets. Signed-off-by: Luca Leonardo Scorcia Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260908174259.9009-4-l.scorcia@gmail.com Signed-off-by: Guenter Roeck --- .../bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + .../dt-bindings/reset/mediatek,mt8167-wdt.h | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt8167-wdt.h diff --git a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml index e6e4546da0aa..f9b725592c27 100644 --- a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml @@ -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 diff --git a/include/dt-bindings/reset/mediatek,mt8167-wdt.h b/include/dt-bindings/reset/mediatek,mt8167-wdt.h new file mode 100644 index 000000000000..1a24bfe079ca --- /dev/null +++ b/include/dt-bindings/reset/mediatek,mt8167-wdt.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +#ifndef _DT_BINDINGS_RESET_MEDIATEK_MT8167_WDT_H_ +#define _DT_BINDINGS_RESET_MEDIATEK_MT8167_WDT_H_ + +/* TOPRGU reset IDs */ +#define MT8167_TOPRGU_DDRPHY_FLASH_RST 0 +#define MT8167_TOPRGU_AUD_PAD_RST 1 +#define MT8167_TOPRGU_MM_RST 2 +#define MT8167_TOPRGU_MFG_RST 3 +#define MT8167_TOPRGU_MDSYS_RST 4 +#define MT8167_TOPRGU_CONN_RST 5 +#define MT8167_TOPRGU_PAD2CAM_DIG_MIPI_RX_RST 6 +#define MT8167_TOPRGU_DIG_MIPI_TX_RST 7 +#define MT8167_TOPRGU_SPI_PAD_MACRO_RST 8 +#define MT8167_TOPRGU_APMIXED_RST 9 +#define MT8167_TOPRGU_VDEC_RST 10 +#define MT8167_TOPRGU_CONN_MCU_RST 11 +#define MT8167_TOPRGU_EFUSE_RST 12 +#define MT8167_TOPRGU_PWRAP_SPICTL_RST 13 + +#endif /* _DT_BINDINGS_RESET_MEDIATEK_MT8167_WDT_H_ */ From b2937ea44b469f1891d163dc200f8556e63d1d13 Mon Sep 17 00:00:00 2001 From: Luca Leonardo Scorcia Date: Tue, 8 Sep 2026 19:38:31 +0200 Subject: [PATCH 18/22] watchdog: mediatek: Add support for mt8167 toprgu/watchdog Add support for the Top Reset Generation Unit/Watchdog Timer found on mt8167. Since according to its data sheet mt8167 toprgu reset bits are not contiguous, add support for a reset table to the driver. This lets us define reset identifiers as contiguous indexes in the binding headers. Also address a preexisting Sashiko finding that noticed that the has_swsysrst_en configuration was set after the reset controller registration. Signed-off-by: Luca Leonardo Scorcia Link: https://patch.msgid.link/20260908174259.9009-5-l.scorcia@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/mtk_wdt.c | 47 ++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index cb7ec07c8e3d..095ca85523d9 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -80,11 +81,14 @@ struct mtk_wdt_dev { 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 = { @@ -132,6 +136,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. @@ -162,6 +189,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) @@ -507,12 +543,14 @@ static int mtk_wdt_probe(struct platform_device *pdev) 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 = @@ -553,6 +591,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = { { .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 }, From 07c03fc1d077ebac5427dbb9b888e0b2944b61a2 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Fri, 18 Sep 2026 22:19:14 +0800 Subject: [PATCH 19/22] watchdog: use assign_bit() where applicable Convert open-coded if/else with set_bit/clear_bit and their non-atomic __set_bit/__clear_bit variants to the assign_bit/__assign_bit API. Signed-off-by: Peng Fan Link: https://patch.msgid.link/20260918141915.3023207-1-peng.fan@oss.nxp.com Signed-off-by: Guenter Roeck --- drivers/watchdog/watchdog_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index 38c1e63a8e2c..2948fe52e093 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -314,10 +314,7 @@ 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); + assign_bit(WDOG_STOP_ON_REBOOT, &wdd->status, stop_on_reboot); } if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) { From b152ca999c5f11fefdd156a1182e022fa22ebed3 Mon Sep 17 00:00:00 2001 From: Petr Pavlu Date: Tue, 22 Sep 2026 15:32:21 +0200 Subject: [PATCH 20/22] watchdog: Replace __MODULE_STRING() with __stringify() __MODULE_STRING() has been an alias for __stringify() since "[PATCH] MODULE_PARM support for older modules" [1] in 2002-12. That change also moved it to the graveyard section at the end of linux/module.h Replace the remaining uses of __MODULE_STRING() with __stringify() in preparation for its removal. Link: https://git.kernel.org/tglx/history/c/136839a1b4 [1] Signed-off-by: Petr Pavlu Reviewed-by: Wolfram Sang Link: https://patch.msgid.link/20260922-module-string-v1-1-c18766690185@suse.com Signed-off-by: Guenter Roeck --- drivers/watchdog/acquirewdt.c | 3 ++- drivers/watchdog/advantech_ec_wdt.c | 3 ++- drivers/watchdog/advantechwdt.c | 5 +++-- drivers/watchdog/airoha_wdt.c | 5 +++-- drivers/watchdog/alim1535_wdt.c | 5 +++-- drivers/watchdog/alim7101_wdt.c | 5 +++-- drivers/watchdog/arm_smc_wdt.c | 3 ++- drivers/watchdog/armada_37xx_wdt.c | 3 ++- drivers/watchdog/aspeed_wdt.c | 3 ++- drivers/watchdog/at91rm9200_wdt.c | 5 +++-- drivers/watchdog/at91sam9_wdt.c | 5 +++-- drivers/watchdog/atcwdt200_wdt.c | 5 +++-- drivers/watchdog/ath79_wdt.c | 5 +++-- drivers/watchdog/bcm2835_wdt.c | 3 ++- drivers/watchdog/bcm47xx_wdt.c | 5 +++-- drivers/watchdog/bcm7038_wdt.c | 3 ++- drivers/watchdog/booke_wdt.c | 3 ++- drivers/watchdog/cadence_wdt.c | 5 +++-- drivers/watchdog/cgbc_wdt.c | 7 ++++--- drivers/watchdog/da9052_wdt.c | 5 +++-- drivers/watchdog/da9055_wdt.c | 3 ++- drivers/watchdog/davinci_wdt.c | 5 +++-- drivers/watchdog/db8500_wdt.c | 5 +++-- drivers/watchdog/dw_wdt.c | 3 ++- drivers/watchdog/ebc-c384_wdt.c | 5 +++-- drivers/watchdog/eurotechwdt.c | 3 ++- drivers/watchdog/exar_wdt.c | 5 +++-- drivers/watchdog/f71808e_wdt.c | 9 +++++---- drivers/watchdog/gef_wdt.c | 3 ++- drivers/watchdog/geodewdt.c | 5 +++-- drivers/watchdog/gpio_wdt.c | 3 ++- drivers/watchdog/hpwdt.c | 3 ++- drivers/watchdog/i6300esb.c | 9 +++++---- drivers/watchdog/iTCO_wdt.c | 5 +++-- drivers/watchdog/ib700wdt.c | 5 +++-- drivers/watchdog/ibmasr.c | 3 ++- drivers/watchdog/ie6xx_wdt.c | 5 +++-- drivers/watchdog/imgpdc_wdt.c | 5 +++-- drivers/watchdog/imx2_wdt.c | 5 +++-- drivers/watchdog/imx7ulp_wdt.c | 3 ++- drivers/watchdog/imx_sc_wdt.c | 3 ++- drivers/watchdog/indydog.c | 3 ++- drivers/watchdog/intel_oc_wdt.c | 5 +++-- drivers/watchdog/it87_wdt.c | 7 ++++--- drivers/watchdog/jz4740_wdt.c | 7 ++++--- drivers/watchdog/keembay_wdt.c | 5 +++-- drivers/watchdog/kempld_wdt.c | 7 ++++--- drivers/watchdog/lenovo_se10_wdt.c | 5 +++-- drivers/watchdog/lenovo_se30_wdt.c | 5 +++-- drivers/watchdog/lenovo_se30g2_se60_wdt.c | 5 +++-- drivers/watchdog/loongson1_wdt.c | 5 +++-- drivers/watchdog/lpc18xx_wdt.c | 5 +++-- drivers/watchdog/ma35d1_wdt.c | 3 ++- drivers/watchdog/max63xx_wdt.c | 7 ++++--- drivers/watchdog/max77620_wdt.c | 3 ++- drivers/watchdog/mena21_wdt.c | 3 ++- drivers/watchdog/menf21bmc_wdt.c | 3 ++- drivers/watchdog/menz69_wdt.c | 3 ++- drivers/watchdog/meson_gxbb_wdt.c | 5 +++-- drivers/watchdog/meson_wdt.c | 3 ++- drivers/watchdog/mixcomwd.c | 3 ++- drivers/watchdog/mpc8xxx_wdt.c | 5 +++-- drivers/watchdog/mt7621_wdt.c | 3 ++- drivers/watchdog/mtk_wdt.c | 3 ++- drivers/watchdog/nct6694_wdt.c | 3 ++- drivers/watchdog/ni903x_wdt.c | 5 +++-- drivers/watchdog/nic7018_wdt.c | 5 +++-- drivers/watchdog/nv_tco.c | 5 +++-- drivers/watchdog/octeon-wdt-main.c | 5 +++-- drivers/watchdog/omap_wdt.c | 3 ++- drivers/watchdog/orion_wdt.c | 3 ++- drivers/watchdog/pc87413_wdt.c | 7 ++++--- drivers/watchdog/pcwd.c | 5 +++-- drivers/watchdog/pcwd_pci.c | 5 +++-- drivers/watchdog/pcwd_usb.c | 5 +++-- drivers/watchdog/pika_wdt.c | 5 +++-- drivers/watchdog/pnx4008_wdt.c | 5 +++-- drivers/watchdog/pseries-wdt.c | 7 ++++--- drivers/watchdog/rc32434_wdt.c | 5 +++-- drivers/watchdog/renesas_wdt.c | 3 ++- drivers/watchdog/rn5t618_wdt.c | 3 ++- drivers/watchdog/rt2880_wdt.c | 3 ++- drivers/watchdog/rti_wdt.c | 5 +++-- drivers/watchdog/rzg2l_wdt.c | 3 ++- drivers/watchdog/rzv2h_wdt.c | 3 ++- drivers/watchdog/s32g_wdt.c | 5 +++-- drivers/watchdog/s3c2410_wdt.c | 7 ++++--- drivers/watchdog/sama5d4_wdt.c | 5 +++-- drivers/watchdog/sbc60xxwdt.c | 5 +++-- drivers/watchdog/sbc7240_wdt.c | 5 +++-- drivers/watchdog/sbc8360.c | 3 ++- drivers/watchdog/sbc_epx_c3.c | 3 ++- drivers/watchdog/sbsa_gwdt.c | 5 +++-- drivers/watchdog/sc1200wdt.c | 3 ++- drivers/watchdog/sch311x_wdt.c | 5 +++-- drivers/watchdog/shwdt.c | 7 ++++--- drivers/watchdog/simatic-ipc-wdt.c | 3 ++- drivers/watchdog/sl28cpld_wdt.c | 3 ++- drivers/watchdog/smsc37b787_wdt.c | 3 ++- drivers/watchdog/softdog.c | 5 +++-- drivers/watchdog/sp5100_tco.c | 7 ++++--- drivers/watchdog/starfive-wdt.c | 7 ++++--- drivers/watchdog/stmp3xxx_rtc_wdt.c | 5 +++-- drivers/watchdog/stpmic1_wdt.c | 3 ++- drivers/watchdog/sun4v_wdt.c | 5 +++-- drivers/watchdog/sunplus_wdt.c | 3 ++- drivers/watchdog/sunxi_wdt.c | 3 ++- drivers/watchdog/tegra_wdt.c | 5 +++-- drivers/watchdog/tqmx86_wdt.c | 3 ++- drivers/watchdog/ts4800_wdt.c | 3 ++- drivers/watchdog/twl4030_wdt.c | 3 ++- drivers/watchdog/txx9wdt.c | 7 ++++--- drivers/watchdog/uniphier_wdt.c | 5 +++-- drivers/watchdog/via_wdt.c | 5 +++-- drivers/watchdog/visconti_wdt.c | 3 ++- drivers/watchdog/w83627hf_wdt.c | 5 +++-- drivers/watchdog/w83877f_wdt.c | 5 +++-- drivers/watchdog/w83977f_wdt.c | 5 +++-- drivers/watchdog/wafer5823wdt.c | 5 +++-- drivers/watchdog/watchdog_dev.c | 5 +++-- drivers/watchdog/wdat_wdt.c | 5 +++-- drivers/watchdog/wdt.c | 5 +++-- drivers/watchdog/wdt977.c | 5 +++-- drivers/watchdog/wdt_pci.c | 5 +++-- drivers/watchdog/wm831x_wdt.c | 3 ++- drivers/watchdog/wm8350_wdt.c | 3 ++- drivers/watchdog/xen_wdt.c | 5 +++-- drivers/watchdog/xilinx_wwdt.c | 5 +++-- drivers/watchdog/ziirave_wdt.c | 3 ++- 129 files changed, 352 insertions(+), 223 deletions(-) diff --git a/drivers/watchdog/acquirewdt.c b/drivers/watchdog/acquirewdt.c index 052f65c48a70..cb62800e89ed 100644 --- a/drivers/watchdog/acquirewdt.c +++ b/drivers/watchdog/acquirewdt.c @@ -64,6 +64,7 @@ #include /* For __init/__exit/... */ #include /* For copy_to_user/put_user/... */ #include /* For inb/outb/... */ +#include /* 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 diff --git a/drivers/watchdog/advantech_ec_wdt.c b/drivers/watchdog/advantech_ec_wdt.c index 7c380f90ca58..2470c4303267 100644 --- a/drivers/watchdog/advantech_ec_wdt.c +++ b/drivers/watchdog/advantech_ec_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #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) { diff --git a/drivers/watchdog/advantechwdt.c b/drivers/watchdog/advantechwdt.c index 42d3f3771781..6d24a6bc8f90 100644 --- a/drivers/watchdog/advantechwdt.c +++ b/drivers/watchdog/advantechwdt.c @@ -37,6 +37,7 @@ #include #include #include +#include #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 diff --git a/drivers/watchdog/airoha_wdt.c b/drivers/watchdog/airoha_wdt.c index 4bd333189b87..c535c48ab6a8 100644 --- a/drivers/watchdog/airoha_wdt.c +++ b/drivers/watchdog/airoha_wdt.c @@ -20,6 +20,7 @@ #include #include #include +#include /* 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) { diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c index 1ecbd1ac5c3a..d2f8d3331fe4 100644 --- a/drivers/watchdog/alim1535_wdt.c +++ b/drivers/watchdog/alim1535_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #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 diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c index 03a559b41f5b..e9611c76a269 100644 --- a/drivers/watchdog/alim7101_wdt.c +++ b/drivers/watchdog/alim7101_wdt.c @@ -36,6 +36,7 @@ #include #include #include +#include #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 diff --git a/drivers/watchdog/arm_smc_wdt.c b/drivers/watchdog/arm_smc_wdt.c index bbba23ace7b8..c73ed1dcdfcb 100644 --- a/drivers/watchdog/arm_smc_wdt.c +++ b/drivers/watchdog/arm_smc_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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 "); diff --git a/drivers/watchdog/armada_37xx_wdt.c b/drivers/watchdog/armada_37xx_wdt.c index a17a7911771a..d62b02c40b0e 100644 --- a/drivers/watchdog/armada_37xx_wdt.c +++ b/drivers/watchdog/armada_37xx_wdt.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 48454ac86074..d4bd41cb801e 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -17,12 +17,13 @@ #include #include #include +#include #include 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; diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index d5afcc634221..8c292d246981 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -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 diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 80ba04df54ad..f966da602011 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -32,6 +32,7 @@ #include #include #include +#include #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 { diff --git a/drivers/watchdog/atcwdt200_wdt.c b/drivers/watchdog/atcwdt200_wdt.c index 7e757c217b0b..ceedc3f67632 100644 --- a/drivers/watchdog/atcwdt200_wdt.c +++ b/drivers/watchdog/atcwdt200_wdt.c @@ -19,6 +19,7 @@ #include #include #include +#include #include /* 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 "); diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c index 7df703e9852a..02783c1ec526 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c @@ -32,6 +32,7 @@ #include #include #include +#include #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; diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c index 6fd8b1b8e386..1a0fc66cc093 100644 --- a/drivers/watchdog/bcm2835_wdt.c +++ b/drivers/watchdog/bcm2835_wdt.c @@ -20,6 +20,7 @@ #include #include #include +#include #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 "); diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index e13ec0975bef..0d7e8a87074a 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c @@ -21,6 +21,7 @@ #include #include #include +#include #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) { diff --git a/drivers/watchdog/bcm7038_wdt.c b/drivers/watchdog/bcm7038_wdt.c index e038dd66b819..1117026cf959 100644 --- a/drivers/watchdog/bcm7038_wdt.c +++ b/drivers/watchdog/bcm7038_wdt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #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"); diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 1b1fb389b89b..1224d1737e87 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -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 diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c index ba2efccef467..55a7c08dc1c1 100644 --- a/drivers/watchdog/cadence_wdt.c +++ b/drivers/watchdog/cadence_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #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 diff --git a/drivers/watchdog/cgbc_wdt.c b/drivers/watchdog/cgbc_wdt.c index 702b055ba6f4..a90e6af13bed 100644 --- a/drivers/watchdog/cgbc_wdt.c +++ b/drivers/watchdog/cgbc_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index afb7887c3a1e..959cba0a8819 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c index 9d5a2009466f..cbb87855bd6a 100644 --- a/drivers/watchdog/da9055_wdt.c +++ b/drivers/watchdog/da9055_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -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 diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 748dd24affb3..074e95cf2fe7 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -19,6 +19,7 @@ #include #include #include +#include #define MODULE_NAME "DAVINCI-WDT: " @@ -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"); diff --git a/drivers/watchdog/db8500_wdt.c b/drivers/watchdog/db8500_wdt.c index 70ccea13288d..7e11c28997ec 100644 --- a/drivers/watchdog/db8500_wdt.c +++ b/drivers/watchdog/db8500_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -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) { diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 39031445d754..c1d40d7b2165 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #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, diff --git a/drivers/watchdog/ebc-c384_wdt.c b/drivers/watchdog/ebc-c384_wdt.c index 8ef4b0df3855..39cc1f7e1cdb 100644 --- a/drivers/watchdog/ebc-c384_wdt.c +++ b/drivers/watchdog/ebc-c384_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #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) { diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c index 10c647b1226a..4d671c4e148a 100644 --- a/drivers/watchdog/eurotechwdt.c +++ b/drivers/watchdog/eurotechwdt.c @@ -56,6 +56,7 @@ #include #include #include +#include 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 diff --git a/drivers/watchdog/exar_wdt.c b/drivers/watchdog/exar_wdt.c index db62c9797406..553be158a725 100644 --- a/drivers/watchdog/exar_wdt.c +++ b/drivers/watchdog/exar_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #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) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 6a16d3d0bb1e..2790061a68f3 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #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); diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index bf6f733dfb5f..4d39588a49c3 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -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) diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c index 5b80ade1c681..437cc0a53654 100644 --- a/drivers/watchdog/geodewdt.c +++ b/drivers/watchdog/geodewdt.c @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -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; diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c index 1abc7d0b78a6..2cd79c8f60dc 100644 --- a/drivers/watchdog/gpio_wdt.c +++ b/drivers/watchdog/gpio_wdt.c @@ -11,13 +11,14 @@ #include #include #include +#include #include 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 diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 8af1fad2de0b..7b9eb4e4b6e7 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #ifdef CONFIG_HPWDT_NMI_DECODING #include @@ -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"); diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index 13daafe05c43..7f08d6d2ca77 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c @@ -37,6 +37,7 @@ #include #include #include +#include /* 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) \ - " /* For io-port access */ #include /* For copy_to_user/put_user/... */ #include /* For inb/outb/... */ +#include /* For __stringify */ #include #include @@ -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); diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c index 5ce6101d236d..3806d86eb36a 100644 --- a/drivers/watchdog/ib700wdt.c +++ b/drivers/watchdog/ib700wdt.c @@ -41,6 +41,7 @@ #include #include #include +#include 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) ")"); /* diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index cf845f865945..53bd84e6d57f 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c @@ -21,6 +21,7 @@ #include #include #include +#include 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"); diff --git a/drivers/watchdog/ie6xx_wdt.c b/drivers/watchdog/ie6xx_wdt.c index 5a7bb7e84653..eda515b917cc 100644 --- a/drivers/watchdog/ie6xx_wdt.c +++ b/drivers/watchdog/ie6xx_wdt.c @@ -17,6 +17,7 @@ #include #include #include +#include #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); diff --git a/drivers/watchdog/imgpdc_wdt.c b/drivers/watchdog/imgpdc_wdt.c index 65cc8396aa59..bb6227c40de4 100644 --- a/drivers/watchdog/imgpdc_wdt.c +++ b/drivers/watchdog/imgpdc_wdt.c @@ -43,6 +43,7 @@ #include #include #include +#include #include /* 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; diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 4b3a192ee3e8..58aa5f999f4f 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #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", diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c index 855dc9d5083a..f61936194aea 100644 --- a/drivers/watchdog/imx7ulp_wdt.c +++ b/drivers/watchdog/imx7ulp_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #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; diff --git a/drivers/watchdog/imx_sc_wdt.c b/drivers/watchdog/imx_sc_wdt.c index 1280b9b1ec2a..fc39f9db4c06 100644 --- a/drivers/watchdog/imx_sc_wdt.c +++ b/drivers/watchdog/imx_sc_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #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; diff --git a/drivers/watchdog/indydog.c b/drivers/watchdog/indydog.c index d3092d261345..5268b1feb7ce 100644 --- a/drivers/watchdog/indydog.c +++ b/drivers/watchdog/indydog.c @@ -22,6 +22,7 @@ #include #include #include +#include #include 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) { diff --git a/drivers/watchdog/intel_oc_wdt.c b/drivers/watchdog/intel_oc_wdt.c index a39892c10770..d1e9a3f62369 100644 --- a/drivers/watchdog/intel_oc_wdt.c +++ b/drivers/watchdog/intel_oc_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #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) { diff --git a/drivers/watchdog/it87_wdt.c b/drivers/watchdog/it87_wdt.c index 1d9f8591f38d..087250ab036a 100644 --- a/drivers/watchdog/it87_wdt.c +++ b/drivers/watchdog/it87_wdt.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -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 */ diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 395bde79e292..9dec1b822410 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -19,6 +19,7 @@ #include #include #include +#include #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; diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index 20b9eb6a2727..76246a7714ca 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include /* 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; diff --git a/drivers/watchdog/kempld_wdt.c b/drivers/watchdog/kempld_wdt.c index e6c7a2906680..b4cde48d2b10 100644 --- a/drivers/watchdog/kempld_wdt.c +++ b/drivers/watchdog/kempld_wdt.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #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, diff --git a/drivers/watchdog/lenovo_se10_wdt.c b/drivers/watchdog/lenovo_se10_wdt.c index 503e220263f9..1eaf86c85cc0 100644 --- a/drivers/watchdog/lenovo_se10_wdt.c +++ b/drivers/watchdog/lenovo_se10_wdt.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/lenovo_se30_wdt.c b/drivers/watchdog/lenovo_se30_wdt.c index 1c73bb7eeeee..127ea9a1933f 100644 --- a/drivers/watchdog/lenovo_se30_wdt.c +++ b/drivers/watchdog/lenovo_se30_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #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 diff --git a/drivers/watchdog/lenovo_se30g2_se60_wdt.c b/drivers/watchdog/lenovo_se30g2_se60_wdt.c index f31ecdb82ad0..c87abdb1a1b2 100644 --- a/drivers/watchdog/lenovo_se30g2_se60_wdt.c +++ b/drivers/watchdog/lenovo_se30g2_se60_wdt.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/loongson1_wdt.c b/drivers/watchdog/loongson1_wdt.c index 2417519717cc..7f8de11f1b4a 100644 --- a/drivers/watchdog/loongson1_wdt.c +++ b/drivers/watchdog/loongson1_wdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include /* 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; diff --git a/drivers/watchdog/lpc18xx_wdt.c b/drivers/watchdog/lpc18xx_wdt.c index 3e8e80bbcb93..633119e4b126 100644 --- a/drivers/watchdog/lpc18xx_wdt.c +++ b/drivers/watchdog/lpc18xx_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include /* 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; diff --git a/drivers/watchdog/ma35d1_wdt.c b/drivers/watchdog/ma35d1_wdt.c index 119d58f338bf..ede4bee594f1 100644 --- a/drivers/watchdog/ma35d1_wdt.c +++ b/drivers/watchdog/ma35d1_wdt.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -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 "); diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index 0aecf411f91b..17b19dfdad16 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c @@ -23,6 +23,7 @@ #include #include #include +#include #define DEFAULT_HEARTBEAT 60 #define MAX_HEARTBEAT 60 @@ -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, diff --git a/drivers/watchdog/max77620_wdt.c b/drivers/watchdog/max77620_wdt.c index ed5a98cea525..79148cbad4f2 100644 --- a/drivers/watchdog/max77620_wdt.c +++ b/drivers/watchdog/max77620_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include 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 "); MODULE_AUTHOR("Luca Ceresoli "); diff --git a/drivers/watchdog/mena21_wdt.c b/drivers/watchdog/mena21_wdt.c index 99d2359d5a8a..a762462c25c5 100644 --- a/drivers/watchdog/mena21_wdt.c +++ b/drivers/watchdog/mena21_wdt.c @@ -17,6 +17,7 @@ #include #include #include +#include #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) { diff --git a/drivers/watchdog/menf21bmc_wdt.c b/drivers/watchdog/menf21bmc_wdt.c index 81ebdfc371f4..bb8eda18fbad 100644 --- a/drivers/watchdog/menf21bmc_wdt.c +++ b/drivers/watchdog/menf21bmc_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #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; diff --git a/drivers/watchdog/menz69_wdt.c b/drivers/watchdog/menz69_wdt.c index 3fe23451135d..962c6867bc07 100644 --- a/drivers/watchdog/menz69_wdt.c +++ b/drivers/watchdog/menz69_wdt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include 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) { diff --git a/drivers/watchdog/meson_gxbb_wdt.c b/drivers/watchdog/meson_gxbb_wdt.c index a48622d11ad7..fb276060e831 100644 --- a/drivers/watchdog/meson_gxbb_wdt.c +++ b/drivers/watchdog/meson_gxbb_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c index 44db4ebc8599..80a4f8771335 100644 --- a/drivers/watchdog/meson_wdt.c +++ b/drivers/watchdog/meson_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -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 "); diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c index 1ecd5c48a005..db358df2f222 100644 --- a/drivers/watchdog/mixcomwd.c +++ b/drivers/watchdog/mixcomwd.c @@ -52,6 +52,7 @@ #include #include #include +#include /* * 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) { diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index a4b497ecfa20..0d5a360b5629 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #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 #include #include +#include #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) { diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 095ca85523d9..1b95392c0f78 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -32,6 +32,7 @@ #include #include #include +#include #define WDT_MAX_TIMEOUT 31 #define WDT_MIN_TIMEOUT 2 @@ -620,7 +621,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 "); diff --git a/drivers/watchdog/nct6694_wdt.c b/drivers/watchdog/nct6694_wdt.c index bc3689bd4b6b..169a6736e9ea 100644 --- a/drivers/watchdog/nct6694_wdt.c +++ b/drivers/watchdog/nct6694_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #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, diff --git a/drivers/watchdog/ni903x_wdt.c b/drivers/watchdog/ni903x_wdt.c index c72a9ee9cb8e..68b7c485726b 100644 --- a/drivers/watchdog/ni903x_wdt.c +++ b/drivers/watchdog/ni903x_wdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #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) { diff --git a/drivers/watchdog/nic7018_wdt.c b/drivers/watchdog/nic7018_wdt.c index 8169423801f0..2b122ba8733a 100644 --- a/drivers/watchdog/nic7018_wdt.c +++ b/drivers/watchdog/nic7018_wdt.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/nv_tco.c b/drivers/watchdog/nv_tco.c index f16cee5173d5..0d671b8bb391 100644 --- a/drivers/watchdog/nv_tco.c +++ b/drivers/watchdog/nv_tco.c @@ -32,6 +32,7 @@ #include #include #include +#include #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 #include #include +#include #include #include @@ -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); diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 95c7e44b7baa..2a6de73e6f0b 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #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); diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c index 0ea946823b0a..5d56e93f0406 100644 --- a/drivers/watchdog/orion_wdt.c +++ b/drivers/watchdog/orion_wdt.c @@ -22,6 +22,7 @@ #include #include #include +#include /* 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"); diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index 7c17f9eb1f8a..bbd8638cd5f2 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c @@ -30,6 +30,7 @@ #include #include #include +#include /* #define DEBUG 1 */ @@ -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) ")"); diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c index d4ea7d6ccd6a..3370a9155276 100644 --- a/drivers/watchdog/pcwd.c +++ b/drivers/watchdog/pcwd.c @@ -72,6 +72,7 @@ #include /* For spin_lock/spin_unlock/... */ #include /* For copy_to_user/put_user/... */ #include /* For inb/outb/... */ +#include /* 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 diff --git a/drivers/watchdog/pcwd_pci.c b/drivers/watchdog/pcwd_pci.c index 80fc4e6d3b0a..8c232c760ee5 100644 --- a/drivers/watchdog/pcwd_pci.c +++ b/drivers/watchdog/pcwd_pci.c @@ -47,6 +47,7 @@ #include /* For spin_lock/spin_unlock/... */ #include /* For copy_to_user/put_user/... */ #include /* For inb/outb/... */ +#include /* For __stringify */ /* Module and version information */ #define WATCHDOG_VERSION "1.03" @@ -140,12 +141,12 @@ static int heartbeat = WATCHDOG_HEARTBEAT; module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " "(0 /* For mutex locking */ #include /* For HID_REQ_SET_REPORT & HID_DT_REPORT */ #include /* For copy_to_user/put_user/... */ +#include /* 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 #include #include +#include #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; diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index 87a44a5675a1..a7c39849cbfd 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -30,6 +30,7 @@ #include #include #include +#include /* 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, diff --git a/drivers/watchdog/pseries-wdt.c b/drivers/watchdog/pseries-wdt.c index e97b943e1d3c..5f531a03a0fc 100644 --- a/drivers/watchdog/pseries-wdt.c +++ b/drivers/watchdog/pseries-wdt.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -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; diff --git a/drivers/watchdog/rc32434_wdt.c b/drivers/watchdog/rc32434_wdt.c index 0e5c5c96af58..5301a93abf55 100644 --- a/drivers/watchdog/rc32434_wdt.c +++ b/drivers/watchdog/rc32434_wdt.c @@ -27,6 +27,7 @@ #include /* For spin_lock/spin_unlock/... */ #include /* For copy_to_user/put_user/... */ #include /* For devm_ioremap */ +#include /* For __stringify */ #include /* 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) \ diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c index 97bcd32bade5..8c0041ce5552 100644 --- a/drivers/watchdog/renesas_wdt.c +++ b/drivers/watchdog/renesas_wdt.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c index 87d06d210ac9..14056af36445 100644 --- a/drivers/watchdog/rn5t618_wdt.c +++ b/drivers/watchdog/rn5t618_wdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #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; diff --git a/drivers/watchdog/rt2880_wdt.c b/drivers/watchdog/rt2880_wdt.c index c8edd83bb502..38f31d302a4b 100644 --- a/drivers/watchdog/rt2880_wdt.c +++ b/drivers/watchdog/rt2880_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -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) { diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c index 7c1bd83b056a..6a64adbe1a8e 100644 --- a/drivers/watchdog/rti_wdt.c +++ b/drivers/watchdog/rti_wdt.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -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"); diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c index 509f9dffdacd..592ea7ce6d69 100644 --- a/drivers/watchdog/rzg2l_wdt.c +++ b/drivers/watchdog/rzg2l_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -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, diff --git a/drivers/watchdog/rzv2h_wdt.c b/drivers/watchdog/rzv2h_wdt.c index 83540dd9a37b..a8db85e85c73 100644 --- a/drivers/watchdog/rzv2h_wdt.c +++ b/drivers/watchdog/rzv2h_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -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, diff --git a/drivers/watchdog/s32g_wdt.c b/drivers/watchdog/s32g_wdt.c index 6422a694fc65..bd8740153c17 100644 --- a/drivers/watchdog/s32g_wdt.c +++ b/drivers/watchdog/s32g_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #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); diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index e61439a3f4b2..7053963fb0ac 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -28,6 +28,7 @@ #include #include #include +#include #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)"); /** diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c index ecdd9aeab79c..85efe4db40f0 100644 --- a/drivers/watchdog/sama5d4_wdt.c +++ b/drivers/watchdog/sama5d4_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #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) { diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c index 03eaf48c8f0f..fffe58dcbf93 100644 --- a/drivers/watchdog/sbc60xxwdt.c +++ b/drivers/watchdog/sbc60xxwdt.c @@ -58,6 +58,7 @@ #include #include #include +#include #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); diff --git a/drivers/watchdog/sbc7240_wdt.c b/drivers/watchdog/sbc7240_wdt.c index 21a1f0b32070..077abbdbf582 100644 --- a/drivers/watchdog/sbc7240_wdt.c +++ b/drivers/watchdog/sbc7240_wdt.c @@ -23,6 +23,7 @@ #include #include #include +#include #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); diff --git a/drivers/watchdog/sbc8360.c b/drivers/watchdog/sbc8360.c index a9fd1615b4c3..dafef1df9719 100644 --- a/drivers/watchdog/sbc8360.c +++ b/drivers/watchdog/sbc8360.c @@ -48,6 +48,7 @@ #include #include #include +#include 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. diff --git a/drivers/watchdog/sbc_epx_c3.c b/drivers/watchdog/sbc_epx_c3.c index 1d291dc0a4a6..b17bd1db7b10 100644 --- a/drivers/watchdog/sbc_epx_c3.c +++ b/drivers/watchdog/sbc_epx_c3.c @@ -25,6 +25,7 @@ #include #include #include +#include static int epx_c3_alive; @@ -33,7 +34,7 @@ static int epx_c3_alive; 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 EPXC3_WATCHDOG_CTL_REG 0x1ee /* write 1 to enable, 0 to disable */ #define EPXC3_WATCHDOG_PET_REG 0x1ef /* write anything to pet once enabled */ diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c index 3c5bfd8641c6..3a5ff48a58f2 100644 --- a/drivers/watchdog/sbsa_gwdt.c +++ b/drivers/watchdog/sbsa_gwdt.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -103,7 +104,7 @@ static unsigned int timeout; module_param(timeout, uint, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (>=0, default=" - __MODULE_STRING(DEFAULT_TIMEOUT) ")"); + __stringify(DEFAULT_TIMEOUT) ")"); /* * action refers to action taken when watchdog gets WS0 @@ -120,7 +121,7 @@ static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, bool, S_IRUGO); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); static bool early_enable; module_param(early_enable, bool, 0); diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c index 1d3300c98d43..34cd57420c86 100644 --- a/drivers/watchdog/sc1200wdt.c +++ b/drivers/watchdog/sc1200wdt.c @@ -42,6 +42,7 @@ #include #include #include +#include #define SC1200_MODULE_VER "build 20020303" #define SC1200_MODULE_NAME "sc1200wdt" @@ -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) ")"); diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index 9670a1ea57cb..a2a0b5c2b55b 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c @@ -31,6 +31,7 @@ #include /* For spin_lock/spin_unlock/... */ #include /* For copy_to_user/put_user/... */ #include /* For inb/outb/... */ +#include /* For __stringify */ /* Module and version information */ #define DRV_NAME "sch311x_wdt" @@ -68,13 +69,13 @@ static int timeout = WATCHDOG_TIMEOUT; /* in seconds */ 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) ")"); /* * Super-IO functions diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 719f100aae60..8adecf54b9bc 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #define DRV_NAME "sh-wdt" @@ -329,14 +330,14 @@ MODULE_ALIAS("platform:" DRV_NAME); module_param(clock_division_ratio, int, 0); MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) " - "to 0x7 (5.25ms). (default=" __MODULE_STRING(WTCSR_CKS_4096) ")"); + "to 0x7 (5.25ms). (default=" __stringify(WTCSR_CKS_4096) ")"); module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1 <= heartbeat <= 3600, default=" - __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); + __stringify(WATCHDOG_HEARTBEAT) ")"); module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); diff --git a/drivers/watchdog/simatic-ipc-wdt.c b/drivers/watchdog/simatic-ipc-wdt.c index 1e91f0a560ff..addeecccf2e9 100644 --- a/drivers/watchdog/simatic-ipc-wdt.c +++ b/drivers/watchdog/simatic-ipc-wdt.c @@ -22,6 +22,7 @@ #include #include #include +#include #define WD_ENABLE_IOADR 0x62 #define WD_TRIGGER_IOADR 0x66 @@ -42,7 +43,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) ")"); static struct resource gp_status_reg_227e_res = DEFINE_RES_IO_NAMED(GP_STATUS_REG_227E, SZ_1, KBUILD_MODNAME); diff --git a/drivers/watchdog/sl28cpld_wdt.c b/drivers/watchdog/sl28cpld_wdt.c index c0b5e5fff5d7..e32b757372eb 100644 --- a/drivers/watchdog/sl28cpld_wdt.c +++ b/drivers/watchdog/sl28cpld_wdt.c @@ -10,6 +10,7 @@ #include #include #include +#include #include /* @@ -30,7 +31,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 int timeout; module_param(timeout, int, 0); diff --git a/drivers/watchdog/smsc37b787_wdt.c b/drivers/watchdog/smsc37b787_wdt.c index 9f2c2ab4e2f1..0ee36ae3113e 100644 --- a/drivers/watchdog/smsc37b787_wdt.c +++ b/drivers/watchdog/smsc37b787_wdt.c @@ -55,6 +55,7 @@ #include #include #include +#include /* enable support for minutes as units? */ @@ -611,4 +612,4 @@ MODULE_PARM_DESC(timeout, "range is 1-255 units, default is 60"); module_param(nowayout, bool, 0); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c index 0820e35ad2e3..0ff125958b8a 100644 --- a/drivers/watchdog/softdog.c +++ b/drivers/watchdog/softdog.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -33,13 +34,13 @@ static unsigned int soft_margin = TIMER_MARGIN; /* in seconds */ module_param(soft_margin, uint, 0); MODULE_PARM_DESC(soft_margin, "Watchdog soft_margin in seconds. (0 < soft_margin < 65536, default=" - __MODULE_STRING(TIMER_MARGIN) ")"); + __stringify(TIMER_MARGIN) ")"); 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 soft_noboot; module_param(soft_noboot, int, 0); diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c index efa682f3a181..14d4bffface4 100644 --- a/drivers/watchdog/sp5100_tco.c +++ b/drivers/watchdog/sp5100_tco.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -70,18 +71,18 @@ static struct pci_dev *sp5100_tco_pci; static bool action = WATCHDOG_ACTION; module_param(action, bool, 0); MODULE_PARM_DESC(action, "Action taken when watchdog expires, 0 to reset, 1 to poweroff (default=" - __MODULE_STRING(WATCHDOG_ACTION) ")"); + __stringify(WATCHDOG_ACTION) ")"); #define WATCHDOG_HEARTBEAT 60 /* 60 sec default heartbeat. */ static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (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) ")"); + " (default=" __stringify(WATCHDOG_NOWAYOUT) ")"); /* * Some TCO specific functions diff --git a/drivers/watchdog/starfive-wdt.c b/drivers/watchdog/starfive-wdt.c index 5a3254c83d3b..044b4fdb7350 100644 --- a/drivers/watchdog/starfive-wdt.c +++ b/drivers/watchdog/starfive-wdt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* JH7100 Watchdog register define */ @@ -72,12 +73,12 @@ module_param(early_enable, bool, 0); module_param(nowayout, bool, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (default=" - __MODULE_STRING(STARFIVE_WDT_DEFAULT_TIME) ")"); + __stringify(STARFIVE_WDT_DEFAULT_TIME) ")"); MODULE_PARM_DESC(early_enable, "Watchdog is started at boot time if set to 1, default=" - __MODULE_STRING(STARFIVE_WDT_EARLY_ENA)); + __stringify(STARFIVE_WDT_EARLY_ENA)); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); struct starfive_wdt_variant { unsigned int control; /* Watchdog Control Register for reset enable */ diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c index 958e68746f8e..7511599f3c53 100644 --- a/drivers/watchdog/stmp3xxx_rtc_wdt.c +++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #define WDOG_TICK_RATE 1000 /* 1 kHz clock */ #define STMP3XXX_DEFAULT_TIMEOUT 19 @@ -21,8 +22,8 @@ static int heartbeat = STMP3XXX_DEFAULT_TIMEOUT; module_param(heartbeat, uint, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat period in seconds from 1 to " - __MODULE_STRING(STMP3XXX_MAX_TIMEOUT) ", default " - __MODULE_STRING(STMP3XXX_DEFAULT_TIMEOUT)); + __stringify(STMP3XXX_MAX_TIMEOUT) ", default " + __stringify(STMP3XXX_DEFAULT_TIMEOUT)); static int wdt_start(struct watchdog_device *wdd) { diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c index 45d0c543466f..17f0cdecd22c 100644 --- a/drivers/watchdog/stpmic1_wdt.c +++ b/drivers/watchdog/stpmic1_wdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include /* WATCHDOG CONTROL REGISTER bit */ @@ -25,7 +26,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 stpmic1_wdt { struct stpmic1 *pmic; diff --git a/drivers/watchdog/sun4v_wdt.c b/drivers/watchdog/sun4v_wdt.c index 8db86ad5ee3d..ad56d778776e 100644 --- a/drivers/watchdog/sun4v_wdt.c +++ b/drivers/watchdog/sun4v_wdt.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -27,12 +28,12 @@ static unsigned int timeout; module_param(timeout, uint, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" - __MODULE_STRING(WDT_TIMEOUT) ")"); + __stringify(WDT_TIMEOUT) ")"); static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, bool, S_IRUGO); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); static int sun4v_wdt_stop(struct watchdog_device *wdd) { diff --git a/drivers/watchdog/sunplus_wdt.c b/drivers/watchdog/sunplus_wdt.c index ae0c11a15a05..f2e45907d882 100644 --- a/drivers/watchdog/sunplus_wdt.c +++ b/drivers/watchdog/sunplus_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #define WDT_CTRL 0x00 @@ -38,7 +39,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 sp_wdt_priv { struct watchdog_device wdev; diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c index 3db34524ed13..1e55c5fd43b8 100644 --- a/drivers/watchdog/sunxi_wdt.c +++ b/drivers/watchdog/sunxi_wdt.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #define WDT_MAX_TIMEOUT 16 @@ -357,7 +358,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) ")"); + "(default=" __stringify(WATCHDOG_NOWAYOUT) ")"); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Carlo Caione "); diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c index d5de6c0657a5..6b3f65c4d593 100644 --- a/drivers/watchdog/tegra_wdt.c +++ b/drivers/watchdog/tegra_wdt.c @@ -9,6 +9,7 @@ #include #include #include +#include #include /* minimum and maximum watchdog trigger timeout, in seconds */ @@ -67,13 +68,13 @@ 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 tegra_wdt_start(struct watchdog_device *wdd) { diff --git a/drivers/watchdog/tqmx86_wdt.c b/drivers/watchdog/tqmx86_wdt.c index 83860e94ce9d..1da45a3f8cf3 100644 --- a/drivers/watchdog/tqmx86_wdt.c +++ b/drivers/watchdog/tqmx86_wdt.c @@ -14,6 +14,7 @@ #include #include #include +#include #include /* default timeout (secs) */ @@ -23,7 +24,7 @@ static unsigned int timeout; module_param(timeout, uint, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=4096, default=" - __MODULE_STRING(WDT_TIMEOUT) ")"); + __stringify(WDT_TIMEOUT) ")"); struct tqmx86_wdt { struct watchdog_device wdd; void __iomem *io_base; diff --git a/drivers/watchdog/ts4800_wdt.c b/drivers/watchdog/ts4800_wdt.c index 24b1ad52102e..1bfc8db323c6 100644 --- a/drivers/watchdog/ts4800_wdt.c +++ b/drivers/watchdog/ts4800_wdt.c @@ -12,13 +12,14 @@ #include #include #include +#include #include 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) ")"); /* possible feed values */ #define TS4800_WDT_FEED_2S 0x1 diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index 69a622646d75..d5e06dcf74d9 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c @@ -12,13 +12,14 @@ #include #include #include +#include #define TWL4030_WATCHDOG_CFG_REG_OFFS 0x3 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 twl4030_wdt_write(unsigned char val) { diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 305349844b4f..161a779dc74d 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #define WD_TIMER_CCD 7 /* 1/256 */ @@ -27,14 +28,14 @@ static unsigned int timeout = TIMER_MARGIN; /* in seconds */ module_param(timeout, uint, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. " - "(0 #include #include +#include #include /* WDT timer setting register */ @@ -245,12 +246,12 @@ module_platform_driver(uniphier_wdt_driver); module_param(timeout, uint, 0000); MODULE_PARM_DESC(timeout, "Watchdog timeout seconds in power of 2. (0 < timeout < 128, default=" - __MODULE_STRING(WDT_DEFAULT_TIMEOUT) ")"); + __stringify(WDT_DEFAULT_TIMEOUT) ")"); module_param(nowayout, bool, 0000); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + __stringify(WATCHDOG_NOWAYOUT) ")"); MODULE_AUTHOR("Keiji Hayashibara "); MODULE_DESCRIPTION("UniPhier Watchdog Device Driver"); diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c index be4ca619da65..effa9bc8d354 100644 --- a/drivers/watchdog/via_wdt.c +++ b/drivers/watchdog/via_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -56,12 +57,12 @@ static int timeout = WDT_TIMEOUT; module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, between 1 and 1023 " - "(default = " __MODULE_STRING(WDT_TIMEOUT) ")"); + "(default = " __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) ")"); + "(default = " __stringify(WATCHDOG_NOWAYOUT) ")"); static struct watchdog_device wdt_dev; static struct resource wdt_res; diff --git a/drivers/watchdog/visconti_wdt.c b/drivers/watchdog/visconti_wdt.c index 7795e7fbf67e..fc4f0d4d3d55 100644 --- a/drivers/watchdog/visconti_wdt.c +++ b/drivers/watchdog/visconti_wdt.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #define WDT_CNT 0x00 @@ -29,7 +30,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)")"); + "Watchdog cannot be stopped once started (default=" __stringify(WATCHDOG_NOWAYOUT)")"); struct visconti_wdt_priv { struct watchdog_device wdev; diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index db77599e43a0..5aa4d9c0fc00 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c @@ -35,6 +35,7 @@ #include #include #include +#include #define WATCHDOG_NAME "w83627hf/thf/hg/dhg WDT" #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ @@ -55,13 +56,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) ")"); static int early_disable; module_param(early_disable, int, 0); diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c index 53db59ef774b..3187ea9d1b57 100644 --- a/drivers/watchdog/w83877f_wdt.c +++ b/drivers/watchdog/w83877f_wdt.c @@ -54,6 +54,7 @@ #include #include #include +#include #define OUR_NAME "w83877f_wdt" @@ -84,14 +85,14 @@ 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 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); diff --git a/drivers/watchdog/w83977f_wdt.c b/drivers/watchdog/w83977f_wdt.c index 3776030fa7c6..019fbf65eeb4 100644 --- a/drivers/watchdog/w83977f_wdt.c +++ b/drivers/watchdog/w83977f_wdt.c @@ -25,6 +25,7 @@ #include #include #include +#include #define WATCHDOG_VERSION "1.00" @@ -49,7 +50,7 @@ static DEFINE_SPINLOCK(spinlock); module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (15..7635), default=" - __MODULE_STRING(DEFAULT_TIMEOUT) ")"); + __stringify(DEFAULT_TIMEOUT) ")"); module_param(testmode, int, 0); MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); @@ -57,7 +58,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) ")"); /* * Start the watchdog diff --git a/drivers/watchdog/wafer5823wdt.c b/drivers/watchdog/wafer5823wdt.c index 291109349e73..c564d51fe5a5 100644 --- a/drivers/watchdog/wafer5823wdt.c +++ b/drivers/watchdog/wafer5823wdt.c @@ -36,6 +36,7 @@ #include #include #include +#include #define WATCHDOG_NAME "Wafer 5823 WDT" #define PFX WATCHDOG_NAME ": " @@ -61,13 +62,13 @@ static int timeout = WD_TIMO; /* in seconds */ module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1 <= timeout <= 255, default=" - __MODULE_STRING(WD_TIMO) "."); + __stringify(WD_TIMO) "."); 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 wafwdt_ping(void) { diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index d8ed77d8a220..e8c1fcb53c56 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -44,6 +44,7 @@ #include /* For standard types (like size_t) */ #include /* For watchdog specific items */ #include /* For copy_to_user/put_user/... */ +#include /* For __stringify */ #include "watchdog_core.h" #include "watchdog_pretimeout.h" @@ -1318,9 +1319,9 @@ int watchdog_dev_resume(struct watchdog_device *wdd) module_param(handle_boot_enabled, bool, 0444); MODULE_PARM_DESC(handle_boot_enabled, "Watchdog core auto-updates boot enabled watchdogs before userspace takes over (default=" - __MODULE_STRING(IS_ENABLED(CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED)) ")"); + __stringify(IS_ENABLED(CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED)) ")"); module_param(open_timeout, uint, 0644); MODULE_PARM_DESC(open_timeout, "Maximum time (in seconds, 0 means infinity) for userspace to take over a running watchdog (default=" - __MODULE_STRING(CONFIG_WATCHDOG_OPEN_TIMEOUT) ")"); + __stringify(CONFIG_WATCHDOG_OPEN_TIMEOUT) ")"); diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index 55ea16e73652..a418da46bda2 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #define MAX_WDAT_ACTIONS ACPI_WDAT_ACTION_RESERVED @@ -54,14 +55,14 @@ struct wdat_wdt { 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 WDAT_DEFAULT_TIMEOUT 30 static int timeout = WDAT_DEFAULT_TIMEOUT; module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" - __MODULE_STRING(WDAT_DEFAULT_TIMEOUT) ")"); + __stringify(WDAT_DEFAULT_TIMEOUT) ")"); static int wdat_wdt_read(struct wdat_wdt *wdat, const struct wdat_instruction *instr, u32 *value) diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c index 86aedaec1fef..71517a9f8a7b 100644 --- a/drivers/watchdog/wdt.c +++ b/drivers/watchdog/wdt.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "wd501p.h" @@ -60,13 +61,13 @@ static int wd_heartbeat; module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0 < heartbeat < 65536, default=" - __MODULE_STRING(WD_TIMO) ")"); + __stringify(WD_TIMO) ")"); 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) ")"); /* You must set these - there is no sane way to probe for this board. */ static int io = 0x240; diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c index 1627b589d817..0d2e1e0c16cf 100644 --- a/drivers/watchdog/wdt977.c +++ b/drivers/watchdog/wdt977.c @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -59,7 +60,7 @@ static DEFINE_SPINLOCK(spinlock); module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300, default=" - __MODULE_STRING(DEFAULT_TIMEOUT) ")"); + __stringify(DEFAULT_TIMEOUT) ")"); module_param(testmode, int, 0); MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); @@ -67,7 +68,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) ")"); /* * Start the watchdog diff --git a/drivers/watchdog/wdt_pci.c b/drivers/watchdog/wdt_pci.c index 3468c831d90a..dd5944c87a96 100644 --- a/drivers/watchdog/wdt_pci.c +++ b/drivers/watchdog/wdt_pci.c @@ -49,6 +49,7 @@ #include #include #include +#include #define WDT_IS_PCI @@ -72,13 +73,13 @@ static int wd_heartbeat; module_param(heartbeat, int, 0); MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0 #include #include +#include #include #include @@ -22,7 +23,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 wm831x_wdt_drvdata { struct watchdog_device wdt; diff --git a/drivers/watchdog/wm8350_wdt.c b/drivers/watchdog/wm8350_wdt.c index c82c1b77d91b..5eca195eac18 100644 --- a/drivers/watchdog/wm8350_wdt.c +++ b/drivers/watchdog/wm8350_wdt.c @@ -14,13 +14,14 @@ #include #include #include +#include #include 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 DEFINE_MUTEX(wdt_mutex); diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c index b343f421dc72..3bc323d886d0 100644 --- a/drivers/watchdog/xen_wdt.c +++ b/drivers/watchdog/xen_wdt.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -30,12 +31,12 @@ static time64_t wdt_expires; static unsigned int timeout; module_param(timeout, uint, S_IRUGO); MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds " - "(default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); + "(default=" __stringify(WATCHDOG_TIMEOUT) ")"); static bool nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, bool, S_IRUGO); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " - "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + "(default=" __stringify(WATCHDOG_NOWAYOUT) ")"); static inline time64_t set_timeout(struct watchdog_device *wdd) { diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c index 799ce8d22b2f..b7cdf8140666 100644 --- a/drivers/watchdog/xilinx_wwdt.c +++ b/drivers/watchdog/xilinx_wwdt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* Max timeout is calculated at 100MHz source clock */ @@ -47,11 +48,11 @@ static int closed_window_percent; module_param(wwdt_timeout, int, 0); MODULE_PARM_DESC(wwdt_timeout, "Watchdog time in seconds. (default=" - __MODULE_STRING(XWWDT_DEFAULT_TIMEOUT) ")"); + __stringify(XWWDT_DEFAULT_TIMEOUT) ")"); module_param(closed_window_percent, int, 0); MODULE_PARM_DESC(closed_window_percent, "Watchdog closed window percentage. (default=" - __MODULE_STRING(XWWDT_CLOSE_WINDOW_PERCENT) ")"); + __stringify(XWWDT_CLOSE_WINDOW_PERCENT) ")"); /** * struct xwwdt_device - Watchdog device structure * @base: base io address of WDT device diff --git a/drivers/watchdog/ziirave_wdt.c b/drivers/watchdog/ziirave_wdt.c index f3bb935c08c2..10d4eaa8592a 100644 --- a/drivers/watchdog/ziirave_wdt.c +++ b/drivers/watchdog/ziirave_wdt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -94,7 +95,7 @@ MODULE_PARM_DESC(reset_duration, 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 ziirave_wdt_revision(struct i2c_client *client, struct ziirave_wdt_rev *rev, u8 command) From 8b5a9f09037e3c372c4e9f2fbda85fcfbf5ea5f0 Mon Sep 17 00:00:00 2001 From: Yureka Lilian Date: Thu, 24 Sep 2026 16:17:09 +0200 Subject: [PATCH 21/22] dt-bindings: watchdog: apple,wdt: Add t8140 compatible The watchdog on the Apple t8140 (A18 Pro) SoC is compatible with the M1-M4 SoCs. Add "apple,t8140-wdt" as SoC specific compatible. Acked-by: Rob Herring (Arm) Signed-off-by: Yureka Lilian Link: https://patch.msgid.link/20260924-apple-a18-pro-initial-devicetrees-v3-5-94f7ea52cc64@cyberchaos.dev Signed-off-by: Guenter Roeck --- Documentation/devicetree/bindings/watchdog/apple,wdt.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml index ca4cf01db59f..1af924157f7c 100644 --- a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml @@ -22,6 +22,7 @@ properties: - apple,t6031-wdt - apple,t8122-wdt - apple,t8132-wdt + - apple,t8140-wdt - const: apple,t8103-wdt - items: - enum: From 6276c8195e598361942082423114877265c17692 Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Wed, 23 Sep 2026 22:10:41 -0500 Subject: [PATCH 22/22] watchdog: mediatek: Apply the driver's mode to a watchdog left running When the bootloader leaves the watchdog enabled, probe only marks it running and sets the timeout, so WDT_MODE keeps whatever the bootloader wrote. The Amazon Fire HD 10 (2017) bootloader leaves dual mode with the bark IRQ enabled, and no pretimeout is configured, so each timeout only raises the IRQ and restarts the count: with the 20 s timeout systemd sets, a hung system was reset after 37.95-39.76 s, and after 18.25-20.92 s once IRQ_EN was cleared by hand. Program the mode as mtk_wdt_start() does, which also applies mediatek,disable-extrst and mediatek,reset-by-toprgu to a running watchdog; read those two properties first. Fixes: bbece05c0d3a ("watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze and it doesn't reboot by watchdog problem") Assisted-by: LLM Signed-off-by: Ryan Brue Link: https://patch.msgid.link/20260923-rbrue-suez-upstreaming-mtk-wdt-dual-mode-v1-1-0970852315e4@gmail.com Signed-off-by: Guenter Roeck --- drivers/watchdog/mtk_wdt.c | 43 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index 1b95392c0f78..1630ab65d593 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -327,19 +327,6 @@ 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); @@ -386,6 +373,24 @@ static int mtk_wdt_start(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; + + /* + * 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) { @@ -529,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); @@ -554,12 +565,6 @@ static int mtk_wdt_probe(struct platform_device *pdev) return err; } - 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; }