Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'linux-watchdog-6.8-rc1' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

- Add Mediatek MT7988 watchdog

- Add IT8659 watchdog

- watchdog: set cdev owner before adding

- hpwdt: Only claim UNKNOWN NMI if from iLO

- Various other fixes and improvements

* tag 'linux-watchdog-6.8-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits)
watchdog: mlx_wdt: fix all kernel-doc warnings
dt-bindings: watchdog: qcom,pm8916-wdt: add parent spmi node to example
dt-bindings: watchdog: nxp,pnx4008-wdt: convert txt to yaml
dt-bindings: watchdog: qca,ar7130-wdt: convert txt to yaml
dt-bindings: watchdog: intel,keembay: reference common watchdog schema
dt-bindings: watchdog: re-order entries to match coding convention
watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786
watchdog: it87_wdt: Add IT8659 ID
watchdog: it87_wdt: Remove redundant max_units setting
watchdog: it87_wdt: add blank line after variable declaration
dt-bindings: wdt: Add ts72xx
dt-bindings: watchdog: dlg,da9062-watchdog: Document DA9063 watchdog
dt-bindings: watchdog: dlg,da9062-watchdog: Add fallback for DA9061 watchdog
watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused
watchdog: starfive: add lock annotations to fix context imbalances
watchdog: mediatek: mt7988: add wdt support
dt-bindings: watchdog: mediatek,mtk-wdt: add MT7988 watchdog and toprgu
dt-bindings: watchdog: realtek,rtd1295-watchdog: convert txt to yaml
watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
watchdog/hpwdt: Remove unused variable
...

+306 -136
+3 -3
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
··· 6 6 7 7 title: Allwinner A10 Watchdog 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Chen-Yu Tsai <wens@csie.org> 14 11 - Maxime Ripard <mripard@kernel.org> 12 + 13 + allOf: 14 + - $ref: watchdog.yaml# 15 15 16 16 properties: 17 17 compatible:
+3 -3
Documentation/devicetree/bindings/watchdog/alphascale,asm9260-wdt.yaml
··· 6 6 7 7 title: Alphascale asm9260 Watchdog timer 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Oleksij Rempel <linux@rempel-privat.de> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 14 15 15 properties: 16 16 compatible:
+3 -3
Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
··· 6 6 7 7 title: Apple SoC Watchdog 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Sven Peter <sven@svenpeter.dev> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 14 15 15 properties: 16 16 compatible:
+3 -3
Documentation/devicetree/bindings/watchdog/arm-smc-wdt.yaml
··· 6 6 7 7 title: ARM Secure Monitor Call based watchdog 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Julius Werner <jwerner@chromium.org> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 14 15 15 properties: 16 16 compatible:
+5 -5
Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml
··· 6 6 7 7 title: BCM63xx and BCM7038 watchdog timer 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Florian Fainelli <f.fainelli@gmail.com> 14 11 - Justin Chen <justinpopo6@gmail.com> 15 12 - Rafał Miłecki <rafal@milecki.pl> 13 + 14 + allOf: 15 + - $ref: watchdog.yaml# 16 16 17 17 properties: 18 18 compatible: ··· 29 29 The clock running the watchdog. If no clock is found the driver will 30 30 default to 27000000 Hz. 31 31 32 - unevaluatedProperties: false 33 - 34 32 required: 35 33 - reg 34 + 35 + unevaluatedProperties: false 36 36 37 37 examples: 38 38 - |
+3 -3
Documentation/devicetree/bindings/watchdog/cnxt,cx92755-wdt.yaml
··· 12 12 timer counters. The first timer (called "Timer A") is the only one that can be 13 13 used as watchdog. 14 14 15 - allOf: 16 - - $ref: watchdog.yaml# 17 - 18 15 maintainers: 19 16 - Baruch Siach <baruch@tkos.co.il> 17 + 18 + allOf: 19 + - $ref: watchdog.yaml# 20 20 21 21 properties: 22 22 compatible:
+8 -4
Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
··· 4 4 $id: http://devicetree.org/schemas/watchdog/dlg,da9062-watchdog.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Dialog Semiconductor DA9062/61 Watchdog Timer 7 + title: Dialog Semiconductor DA906{1,2,3} Watchdog Timer 8 8 9 9 maintainers: 10 10 - Steve Twiss <stwiss.opensource@diasemi.com> ··· 14 14 15 15 properties: 16 16 compatible: 17 - enum: 18 - - dlg,da9061-watchdog 19 - - dlg,da9062-watchdog 17 + oneOf: 18 + - enum: 19 + - dlg,da9062-watchdog 20 + - dlg,da9063-watchdog 21 + - items: 22 + - const: dlg,da9061-watchdog 23 + - const: dlg,da9062-watchdog 20 24 21 25 dlg,use-sw-pm: 22 26 type: boolean
+4 -1
Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml
··· 9 9 maintainers: 10 10 - Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com> 11 11 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 12 15 properties: 13 16 compatible: 14 17 enum: ··· 40 37 - interrupt-names 41 38 - clocks 42 39 43 - additionalProperties: false 40 + unevaluatedProperties: false 44 41 45 42 examples: 46 43 - |
+4 -4
Documentation/devicetree/bindings/watchdog/maxim,max63xx.yaml
··· 6 6 7 7 title: Maxim 63xx Watchdog Timers 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml# 12 - 13 9 maintainers: 14 10 - Marc Zyngier <maz@kernel.org> 15 11 - Linus Walleij <linus.walleij@linaro.org> 12 + 13 + allOf: 14 + - $ref: watchdog.yaml# 15 + - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml# 16 16 17 17 properties: 18 18 compatible:
+1
Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml
··· 25 25 - mediatek,mt6735-wdt 26 26 - mediatek,mt6795-wdt 27 27 - mediatek,mt7986-wdt 28 + - mediatek,mt7988-wdt 28 29 - mediatek,mt8183-wdt 29 30 - mediatek,mt8186-wdt 30 31 - mediatek,mt8188-wdt
+34
Documentation/devicetree/bindings/watchdog/nxp,pnx4008-wdt.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/nxp,pnx4008-wdt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP PNX watchdog timer 8 + 9 + maintainers: 10 + - Roland Stigge <stigge@antcom.de> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 15 + properties: 16 + compatible: 17 + const: nxp,pnx4008-wdt 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + required: 23 + - compatible 24 + - reg 25 + 26 + unevaluatedProperties: false 27 + 28 + examples: 29 + - | 30 + watchdog@4003c000 { 31 + compatible = "nxp,pnx4008-wdt"; 32 + reg = <0x4003c000 0x1000>; 33 + timeout-sec = <10>; 34 + };
-17
Documentation/devicetree/bindings/watchdog/pnx4008-wdt.txt
··· 1 - * NXP PNX watchdog timer 2 - 3 - Required properties: 4 - - compatible: must be "nxp,pnx4008-wdt" 5 - - reg: physical base address of the controller and length of memory mapped 6 - region. 7 - 8 - Optional properties: 9 - - timeout-sec: contains the watchdog timeout in seconds. 10 - 11 - Example: 12 - 13 - watchdog@4003c000 { 14 - compatible = "nxp,pnx4008-wdt"; 15 - reg = <0x4003C000 0x1000>; 16 - timeout-sec = <10>; 17 - };
+33
Documentation/devicetree/bindings/watchdog/qca,ar7130-wdt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/qca,ar7130-wdt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Atheros AR7130 Watchdog Timer (WDT) Controller 8 + 9 + maintainers: 10 + - Gabor Juhos <juhosg@openwrt.org> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 15 + properties: 16 + compatible: 17 + const: qca,ar7130-wdt 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + required: 23 + - compatible 24 + - reg 25 + 26 + unevaluatedProperties: false 27 + 28 + examples: 29 + - | 30 + watchdog@18060008 { 31 + compatible = "qca,ar7130-wdt"; 32 + reg = <0x18060008 0x8>; 33 + };
-13
Documentation/devicetree/bindings/watchdog/qca-ar7130-wdt.txt
··· 1 - * Qualcomm Atheros AR7130 Watchdog Timer (WDT) Controller 2 - 3 - Required properties: 4 - - compatible: must be "qca,ar7130-wdt" 5 - - reg: physical base address of the controller and length of memory mapped 6 - region. 7 - 8 - Example: 9 - 10 - wdt@18060008 { 11 - compatible = "qca,ar9330-wdt", "qca,ar7130-wdt"; 12 - reg = <0x18060008 0x8>; 13 - };
+18 -13
Documentation/devicetree/bindings/watchdog/qcom,pm8916-wdt.yaml
··· 30 30 #include <dt-bindings/interrupt-controller/irq.h> 31 31 #include <dt-bindings/spmi/spmi.h> 32 32 33 - pmic@0 { 34 - compatible = "qcom,pm8916", "qcom,spmi-pmic"; 35 - reg = <0x0 SPMI_USID>; 36 - #address-cells = <1>; 33 + spmi { 34 + #address-cells = <2>; 37 35 #size-cells = <0>; 38 36 39 - pon@800 { 40 - compatible = "qcom,pm8916-pon"; 41 - reg = <0x800>; 42 - mode-bootloader = <0x2>; 43 - mode-recovery = <0x1>; 37 + pmic@0 { 38 + compatible = "qcom,pm8916", "qcom,spmi-pmic"; 39 + reg = <0x0 SPMI_USID>; 40 + #address-cells = <1>; 41 + #size-cells = <0>; 44 42 45 - watchdog { 46 - compatible = "qcom,pm8916-wdt"; 47 - interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>; 48 - timeout-sec = <60>; 43 + pon@800 { 44 + compatible = "qcom,pm8916-pon"; 45 + reg = <0x800>; 46 + mode-bootloader = <0x2>; 47 + mode-recovery = <0x1>; 48 + 49 + watchdog { 50 + compatible = "qcom,pm8916-wdt"; 51 + interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>; 52 + timeout-sec = <60>; 53 + }; 49 54 }; 50 55 }; 51 56 };
+1 -1
Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml
··· 123 123 compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt"; 124 124 reg = <0x17c10000 0x1000>; 125 125 clocks = <&sleep_clk>; 126 - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 126 + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; 127 127 timeout-sec = <10>; 128 128 }; 129 129
-17
Documentation/devicetree/bindings/watchdog/realtek,rtd119x.txt
··· 1 - Realtek RTD1295 Watchdog 2 - ======================== 3 - 4 - Required properties: 5 - 6 - - compatible : Should be "realtek,rtd1295-watchdog" 7 - - reg : Specifies the physical base address and size of registers 8 - - clocks : Specifies one clock input 9 - 10 - 11 - Example: 12 - 13 - watchdog@98007680 { 14 - compatible = "realtek,rtd1295-watchdog"; 15 - reg = <0x98007680 0x100>; 16 - clocks = <&osc27M>; 17 - };
+38
Documentation/devicetree/bindings/watchdog/realtek,rtd1295-watchdog.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/realtek,rtd1295-watchdog.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Realtek RTD1295 Watchdog 8 + 9 + maintainers: 10 + - Andreas Färber <afaerber@suse.de> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 15 + properties: 16 + compatible: 17 + const: realtek,rtd1295-watchdog 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + clocks: 23 + maxItems: 1 24 + 25 + required: 26 + - compatible 27 + - reg 28 + - clocks 29 + 30 + unevaluatedProperties: false 31 + 32 + examples: 33 + - | 34 + watchdog@98007680 { 35 + compatible = "realtek,rtd1295-watchdog"; 36 + reg = <0x98007680 0x100>; 37 + clocks = <&osc27M>; 38 + };
+5 -5
Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
··· 6 6 7 7 title: Synopsys Designware Watchdog Timer 8 8 9 - allOf: 10 - - $ref: watchdog.yaml# 11 - 12 9 maintainers: 13 10 - Jamie Iles <jamie@jamieiles.com> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 14 15 15 properties: 16 16 compatible: ··· 73 73 minItems: 16 74 74 maxItems: 16 75 75 76 - unevaluatedProperties: false 77 - 78 76 required: 79 77 - compatible 80 78 - reg 81 79 - clocks 80 + 81 + unevaluatedProperties: false 82 82 83 83 examples: 84 84 - |
+45
Documentation/devicetree/bindings/watchdog/technologic,ts7200-wdt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/watchdog/technologic,ts7200-wdt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Technologic Systems TS-72xx based SBCs watchdog 8 + 9 + maintainers: 10 + - Nikita Shubin <nikita.shubin@maquefel.me> 11 + 12 + allOf: 13 + - $ref: watchdog.yaml# 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - const: technologic,ts7200-wdt 19 + - items: 20 + - enum: 21 + - technologic,ts7300-wdt 22 + - technologic,ts7260-wdt 23 + - technologic,ts7250-wdt 24 + - const: technologic,ts7200-wdt 25 + 26 + reg: 27 + items: 28 + - description: control register 29 + - description: feed register 30 + 31 + required: 32 + - compatible 33 + - reg 34 + 35 + unevaluatedProperties: false 36 + 37 + examples: 38 + - | 39 + watchdog@23800000 { 40 + compatible = "technologic,ts7200-wdt"; 41 + reg = <0x23800000 0x01>, <0x23c00000 0x01>; 42 + timeout-sec = <30>; 43 + }; 44 + 45 + ...
+1 -1
MAINTAINERS
··· 6106 6106 F: Documentation/devicetree/bindings/regulator/dlg,slg51000.yaml 6107 6107 F: Documentation/devicetree/bindings/sound/da[79]*.txt 6108 6108 F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt 6109 - F: Documentation/devicetree/bindings/watchdog/da90??-wdt.txt 6109 + F: Documentation/devicetree/bindings/watchdog/dlg,da90??-watchdog.yaml 6110 6110 F: Documentation/hwmon/da90??.rst 6111 6111 F: drivers/gpio/gpio-da90??.c 6112 6112 F: drivers/hwmon/da90??-hwmon.c
+5 -7
drivers/watchdog/at91sam9_wdt.c
··· 324 324 } 325 325 #endif 326 326 327 - static int __init at91wdt_probe(struct platform_device *pdev) 327 + static int at91wdt_probe(struct platform_device *pdev) 328 328 { 329 329 int err; 330 330 struct at91wdt *wdt; ··· 372 372 return 0; 373 373 } 374 374 375 - static int __exit at91wdt_remove(struct platform_device *pdev) 375 + static void at91wdt_remove(struct platform_device *pdev) 376 376 { 377 377 struct at91wdt *wdt = platform_get_drvdata(pdev); 378 378 watchdog_unregister_device(&wdt->wdd); 379 379 380 380 pr_warn("I quit now, hardware will probably reboot!\n"); 381 381 del_timer(&wdt->timer); 382 - 383 - return 0; 384 382 } 385 383 386 384 #if defined(CONFIG_OF) ··· 391 393 #endif 392 394 393 395 static struct platform_driver at91wdt_driver = { 394 - .remove = __exit_p(at91wdt_remove), 396 + .probe = at91wdt_probe, 397 + .remove_new = at91wdt_remove, 395 398 .driver = { 396 399 .name = "at91_wdt", 397 400 .of_match_table = of_match_ptr(at91_wdt_dt_ids), 398 401 }, 399 402 }; 400 - 401 - module_platform_driver_probe(at91wdt_driver, at91wdt_probe); 403 + module_platform_driver(at91wdt_driver); 402 404 403 405 MODULE_AUTHOR("Renaud CERRATO <r.cerrato@til-technologies.fr>"); 404 406 MODULE_DESCRIPTION("Watchdog driver for Atmel AT91SAM9x processors");
+2 -1
drivers/watchdog/bcm2835_wdt.c
··· 42 42 43 43 #define SECS_TO_WDOG_TICKS(x) ((x) << 16) 44 44 #define WDOG_TICKS_TO_SECS(x) ((x) >> 16) 45 + #define WDOG_TICKS_TO_MSECS(x) ((x) * 1000 >> 16) 45 46 46 47 struct bcm2835_wdt { 47 48 void __iomem *base; ··· 141 140 .info = &bcm2835_wdt_info, 142 141 .ops = &bcm2835_wdt_ops, 143 142 .min_timeout = 1, 144 - .max_timeout = WDOG_TICKS_TO_SECS(PM_WDOG_TIME_SET), 143 + .max_hw_heartbeat_ms = WDOG_TICKS_TO_MSECS(PM_WDOG_TIME_SET), 145 144 .timeout = WDOG_TICKS_TO_SECS(PM_WDOG_TIME_SET), 146 145 }; 147 146
+1 -8
drivers/watchdog/hpwdt.c
··· 33 33 #define DEFAULT_MARGIN 30 34 34 #define PRETIMEOUT_SEC 9 35 35 36 - static bool ilo5; 37 36 static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */ 38 37 static bool nowayout = WATCHDOG_NOWAYOUT; 39 38 static bool pretimeout = IS_ENABLED(CONFIG_HPWDT_NMI_DECODING); ··· 177 178 "3. OA Forward Progress Log\n" 178 179 "4. iLO Event Log"; 179 180 180 - if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi) 181 - return NMI_DONE; 182 - 183 - if (ilo5 && !pretimeout && !mynmi) 181 + if (ulReason == NMI_UNKNOWN && !mynmi) 184 182 return NMI_DONE; 185 183 186 184 if (kdumptimeout < 0) ··· 358 362 dev_info(&dev->dev, "pretimeout: %s.\n", 359 363 pretimeout ? "on" : "off"); 360 364 dev_info(&dev->dev, "kdumptimeout: %d.\n", kdumptimeout); 361 - 362 - if (dev->subsystem_vendor == PCI_VENDOR_ID_HP_3PAR) 363 - ilo5 = true; 364 365 365 366 return 0; 366 367
+21 -8
drivers/watchdog/it87_wdt.c
··· 13 13 * http://www.ite.com.tw/ 14 14 * 15 15 * Support of the watchdog timers, which are available on 16 - * IT8607, IT8613, IT8620, IT8622, IT8625, IT8628, IT8655, IT8665, 17 - * IT8686, IT8702, IT8712, IT8716, IT8718, IT8720, IT8721, IT8726, 18 - * IT8728, IT8772, IT8783 and IT8784. 16 + * IT8607, IT8613, IT8620, IT8622, IT8625, IT8628, IT8655, IT8659, 17 + * IT8665, IT8686, IT8702, IT8712, IT8716, IT8718, IT8720, IT8721, 18 + * IT8726, IT8728, IT8772, IT8783, IT8784 and IT8786. 19 19 */ 20 20 21 21 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ··· 56 56 #define IT8625_ID 0x8625 57 57 #define IT8628_ID 0x8628 58 58 #define IT8655_ID 0x8655 59 + #define IT8659_ID 0x8659 59 60 #define IT8665_ID 0x8665 60 61 #define IT8686_ID 0x8686 61 62 #define IT8702_ID 0x8702 ··· 147 146 static inline int superio_inw(int reg) 148 147 { 149 148 int val; 149 + 150 150 outb(reg++, REG); 151 151 val = inb(VAL) << 8; 152 152 outb(reg, REG); ··· 258 256 static int __init it87_wdt_init(void) 259 257 { 260 258 u8 chip_rev; 259 + u8 ctrl; 261 260 int rc; 262 261 263 262 rc = superio_enter(); ··· 276 273 case IT8712_ID: 277 274 max_units = (chip_rev < 8) ? 255 : 65535; 278 275 break; 279 - case IT8716_ID: 280 - case IT8726_ID: 281 - max_units = 65535; 282 - break; 283 276 case IT8607_ID: 284 277 case IT8613_ID: 285 278 case IT8620_ID: ··· 283 284 case IT8625_ID: 284 285 case IT8628_ID: 285 286 case IT8655_ID: 287 + case IT8659_ID: 286 288 case IT8665_ID: 287 289 case IT8686_ID: 290 + case IT8716_ID: 288 291 case IT8718_ID: 289 292 case IT8720_ID: 290 293 case IT8721_ID: 294 + case IT8726_ID: 291 295 case IT8728_ID: 292 296 case IT8772_ID: 293 297 case IT8783_ID: ··· 317 315 318 316 superio_select(GPIO); 319 317 superio_outb(WDT_TOV1, WDTCFG); 320 - superio_outb(0x00, WDTCTRL); 318 + 319 + switch (chip_type) { 320 + case IT8784_ID: 321 + case IT8786_ID: 322 + ctrl = superio_inb(WDTCTRL); 323 + ctrl &= 0x08; 324 + superio_outb(ctrl, WDTCTRL); 325 + break; 326 + default: 327 + superio_outb(0x00, WDTCTRL); 328 + } 329 + 321 330 superio_exit(); 322 331 323 332 if (timeout < 1 || timeout > max_units * 60) {
+1 -3
drivers/watchdog/mlx_wdt.c
··· 30 30 * struct mlxreg_wdt - wd private data: 31 31 * 32 32 * @wdd: watchdog device; 33 - * @device: basic device; 34 33 * @pdata: data received from platform driver; 35 34 * @regmap: register map of parent device; 36 - * @timeout: defined timeout in sec.; 37 35 * @action_idx: index for direct access to action register; 38 36 * @timeout_idx:index for direct access to TO register; 39 37 * @tleft_idx: index for direct access to time left register; 40 38 * @ping_idx: index for direct access to ping register; 41 39 * @reset_idx: index for direct access to reset cause register; 42 40 * @regmap_val_sz: size of value in register map; 43 - * @wd_type: watchdog HW type; 41 + * @wdt_type: watchdog HW type; 44 42 */ 45 43 struct mlxreg_wdt { 46 44 struct watchdog_device wdd;
+42
drivers/watchdog/mtk_wdt.c
··· 58 58 #define WDT_SWSYSRST 0x18U 59 59 #define WDT_SWSYS_RST_KEY 0x88000000 60 60 61 + #define WDT_SWSYSRST_EN 0xfc 62 + 61 63 #define DRV_NAME "mtk-wdt" 62 64 #define DRV_VERSION "1.0" 65 + 66 + #define MT7988_TOPRGU_SW_RST_NUM 24 63 67 64 68 static bool nowayout = WATCHDOG_NOWAYOUT; 65 69 static unsigned int timeout; ··· 75 71 struct reset_controller_dev rcdev; 76 72 bool disable_wdt_extrst; 77 73 bool reset_by_toprgu; 74 + bool has_swsysrst_en; 78 75 }; 79 76 80 77 struct mtk_wdt_data { 81 78 int toprgu_sw_rst_num; 79 + bool has_swsysrst_en; 82 80 }; 83 81 84 82 static const struct mtk_wdt_data mt2712_data = { ··· 93 87 94 88 static const struct mtk_wdt_data mt7986_data = { 95 89 .toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM, 90 + }; 91 + 92 + static const struct mtk_wdt_data mt7988_data = { 93 + .toprgu_sw_rst_num = MT7988_TOPRGU_SW_RST_NUM, 94 + .has_swsysrst_en = true, 96 95 }; 97 96 98 97 static const struct mtk_wdt_data mt8183_data = { ··· 120 109 .toprgu_sw_rst_num = MT8195_TOPRGU_SW_RST_NUM, 121 110 }; 122 111 112 + /** 113 + * toprgu_reset_sw_en_unlocked() - enable/disable software control for reset bit 114 + * @data: Pointer to instance of driver data. 115 + * @id: Bit number identifying the reset to be enabled or disabled. 116 + * @enable: If true, enable software control for that bit, disable otherwise. 117 + * 118 + * Context: The caller must hold lock of struct mtk_wdt_dev. 119 + */ 120 + static void toprgu_reset_sw_en_unlocked(struct mtk_wdt_dev *data, 121 + unsigned long id, bool enable) 122 + { 123 + u32 tmp; 124 + 125 + tmp = readl(data->wdt_base + WDT_SWSYSRST_EN); 126 + if (enable) 127 + tmp |= BIT(id); 128 + else 129 + tmp &= ~BIT(id); 130 + 131 + writel(tmp, data->wdt_base + WDT_SWSYSRST_EN); 132 + } 133 + 123 134 static int toprgu_reset_update(struct reset_controller_dev *rcdev, 124 135 unsigned long id, bool assert) 125 136 { ··· 152 119 153 120 spin_lock_irqsave(&data->lock, flags); 154 121 122 + if (assert && data->has_swsysrst_en) 123 + toprgu_reset_sw_en_unlocked(data, id, true); 124 + 155 125 tmp = readl(data->wdt_base + WDT_SWSYSRST); 156 126 if (assert) 157 127 tmp |= BIT(id); ··· 162 126 tmp &= ~BIT(id); 163 127 tmp |= WDT_SWSYS_RST_KEY; 164 128 writel(tmp, data->wdt_base + WDT_SWSYSRST); 129 + 130 + if (!assert && data->has_swsysrst_en) 131 + toprgu_reset_sw_en_unlocked(data, id, false); 165 132 166 133 spin_unlock_irqrestore(&data->lock, flags); 167 134 ··· 445 406 wdt_data->toprgu_sw_rst_num); 446 407 if (err) 447 408 return err; 409 + 410 + mtk_wdt->has_swsysrst_en = wdt_data->has_swsysrst_en; 448 411 } 449 412 450 413 mtk_wdt->disable_wdt_extrst = ··· 485 444 { .compatible = "mediatek,mt6589-wdt" }, 486 445 { .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data }, 487 446 { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data }, 447 + { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data }, 488 448 { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data }, 489 449 { .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data }, 490 450 { .compatible = "mediatek,mt8188-wdt", .data = &mt8188_data },
+12 -1
drivers/watchdog/rti_wdt.c
··· 77 77 { 78 78 u32 timer_margin; 79 79 struct rti_wdt_device *wdt = watchdog_get_drvdata(wdd); 80 + int ret; 81 + 82 + ret = pm_runtime_resume_and_get(wdd->parent); 83 + if (ret) 84 + return ret; 80 85 81 86 /* set timeout period */ 82 87 timer_margin = (u64)wdd->timeout * wdt->freq; ··· 348 343 if (last_ping) 349 344 watchdog_set_last_hw_keepalive(wdd, last_ping); 350 345 346 + if (!watchdog_hw_running(wdd)) 347 + pm_runtime_put_sync(&pdev->dev); 348 + 351 349 return 0; 352 350 353 351 err_iomap: ··· 365 357 struct rti_wdt_device *wdt = platform_get_drvdata(pdev); 366 358 367 359 watchdog_unregister_device(&wdt->wdd); 368 - pm_runtime_put(&pdev->dev); 360 + 361 + if (!pm_runtime_suspended(&pdev->dev)) 362 + pm_runtime_put(&pdev->dev); 363 + 369 364 pm_runtime_disable(&pdev->dev); 370 365 } 371 366
+4 -4
drivers/watchdog/starfive-wdt.c
··· 202 202 203 203 /* Write unlock-key to unlock. Write other value to lock. */ 204 204 static void starfive_wdt_unlock(struct starfive_wdt *wdt) 205 + __acquires(&wdt->lock) 205 206 { 206 207 spin_lock(&wdt->lock); 207 208 writel(wdt->variant->unlock_key, wdt->base + wdt->variant->unlock); 208 209 } 209 210 210 211 static void starfive_wdt_lock(struct starfive_wdt *wdt) 212 + __releases(&wdt->lock) 211 213 { 212 214 writel(~wdt->variant->unlock_key, wdt->base + wdt->variant->unlock); 213 215 spin_unlock(&wdt->lock); ··· 506 504 return ret; 507 505 } 508 506 509 - static int starfive_wdt_remove(struct platform_device *pdev) 507 + static void starfive_wdt_remove(struct platform_device *pdev) 510 508 { 511 509 struct starfive_wdt *wdt = platform_get_drvdata(pdev); 512 510 ··· 518 516 else 519 517 /* disable clock without PM */ 520 518 starfive_wdt_disable_clock(wdt); 521 - 522 - return 0; 523 519 } 524 520 525 521 static void starfive_wdt_shutdown(struct platform_device *pdev) ··· 587 587 588 588 static struct platform_driver starfive_wdt_driver = { 589 589 .probe = starfive_wdt_probe, 590 - .remove = starfive_wdt_remove, 590 + .remove_new = starfive_wdt_remove, 591 591 .shutdown = starfive_wdt_shutdown, 592 592 .driver = { 593 593 .name = "starfive-wdt",
+5 -6
drivers/watchdog/txx9wdt.c
··· 98 98 .ops = &txx9wdt_ops, 99 99 }; 100 100 101 - static int __init txx9wdt_probe(struct platform_device *dev) 101 + static int txx9wdt_probe(struct platform_device *dev) 102 102 { 103 103 int ret; 104 104 ··· 145 145 return ret; 146 146 } 147 147 148 - static int __exit txx9wdt_remove(struct platform_device *dev) 148 + static void txx9wdt_remove(struct platform_device *dev) 149 149 { 150 150 watchdog_unregister_device(&txx9wdt); 151 151 clk_disable_unprepare(txx9_imclk); 152 152 clk_put(txx9_imclk); 153 - return 0; 154 153 } 155 154 156 155 static void txx9wdt_shutdown(struct platform_device *dev) ··· 158 159 } 159 160 160 161 static struct platform_driver txx9wdt_driver = { 161 - .remove = __exit_p(txx9wdt_remove), 162 + .probe = txx9wdt_probe, 163 + .remove_new = txx9wdt_remove, 162 164 .shutdown = txx9wdt_shutdown, 163 165 .driver = { 164 166 .name = "txx9wdt", 165 167 }, 166 168 }; 167 - 168 - module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe); 169 + module_platform_driver(txx9wdt_driver); 169 170 170 171 MODULE_DESCRIPTION("TXx9 Watchdog Driver"); 171 172 MODULE_LICENSE("GPL");
+1 -2
drivers/watchdog/watchdog_dev.c
··· 1073 1073 1074 1074 /* Fill in the data structures */ 1075 1075 cdev_init(&wd_data->cdev, &watchdog_fops); 1076 + wd_data->cdev.owner = wdd->ops->owner; 1076 1077 1077 1078 /* Add the device */ 1078 1079 err = cdev_device_add(&wd_data->cdev, &wd_data->dev); ··· 1087 1086 put_device(&wd_data->dev); 1088 1087 return err; 1089 1088 } 1090 - 1091 - wd_data->cdev.owner = wdd->ops->owner; 1092 1089 1093 1090 /* Record time of most recent heartbeat as 'just before now'. */ 1094 1091 wd_data->last_hw_keepalive = ktime_sub(ktime_get(), 1);