projects/linux·commit deb8d159

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

deb8d159 · Linus Torvalds <[email protected]> · 2021-02-22 09:07:51 -08:00

Pull watchdog updates from Wim Van Sebroeck:
 "New drivers:
   - Intel Keembay Soc

  New chip versions:
   - sun4i: Add H616 compatible string
   - mt8192 wdt support
   - more Rockchip compatibles to snps,dw-wdt.yaml
   - binding for Qcom SDX55
   - r8a779a0 (V3U) support

  Removed drivers:
   - sirf prima watchdog driver
   - sirf atlas watchdog driver
   - zte zx watchdog driver
   - tango watchdog driver
   - coh901 watchdog driver

  And several fixes and clean-ups"

* tag 'linux-watchdog-5.12-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits)
  watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ
  watchdog: mei_wdt: request stop on unregister
  dt-bindings: watchdog: Add binding for Qcom SDX55
  watchdog: remove coh901 driver
  watchdog: remove tango driver
  watchdog: remove zte zx driver
  watchdog: remove sirf atlas driver
  watchdog: remove sirf prima driver
  watchdog: mt8192: add wdt support
  dt-binding: mt8192: add toprgu reset-controller head file
  dt-binding: mediatek: mt8192: update mtk-wdt document
  dt-binding: mediatek: watchdog: fix the description of compatible
  dt-binding: watchdog: add more Rockchip compatibles to snps,dw-wdt.yaml
  dt-bindings: watchdog: sun4i: Add H616 compatible string
  watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze and it doesn't reboot by watchdog problem
  watchdog: renesas_wdt: add grace period before rebooting
  watchdog: stop wdd when watchdog hw running in reboot_notifier
  watchdog: ziirave_wdt: remove unused including <linux/version.h>
  dt-bindings: watchdog: renesas,wdt: add r8a779a0 (V3U) support
  watchdog: renesas_wdt: don't sleep in atomic context
  ...
Commit
deb8d159a0a69bd19a328c700bb42b802cbcf7b5
Parents
19472481 · a4f3407c

Merge commit. Changes below are compared with the first parent: 19472481.

Changes

26 files changed · +456 −1512

FileStatusAddDelContent
Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yamlmodified+5−7View file
Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yamladded+57−0View file
Documentation/devicetree/bindings/watchdog/mtk-wdt.txtmodified+3−2View file
Documentation/devicetree/bindings/watchdog/renesas,wdt.yamlmodified+1−0View file
Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txtdeleted+0−18View before deletion
Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txtdeleted+0−18View before deletion
Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yamlmodified+6−0View file
Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txtdeleted+0−19View before deletion
Documentation/devicetree/bindings/watchdog/zte,zx2967-wdt.txtdeleted+0−32View before deletion
drivers/watchdog/Kconfigmodified+13−52View file
drivers/watchdog/Makefilemodified+1−5View file
drivers/watchdog/atlas7_wdt.cdeleted+0−221View before deletion
drivers/watchdog/coh901327_wdt.cdeleted+0−408View before deletion
drivers/watchdog/hpwdt.cmodified+3−3View file
drivers/watchdog/it8712f_wdt.cmodified+0−1View file
drivers/watchdog/keembay_wdt.cadded+286−0View file
drivers/watchdog/mei_wdt.cmodified+1−0View file
drivers/watchdog/mtk_wdt.cmodified+21−2View file
drivers/watchdog/qcom-wdt.cmodified+1−12View file
drivers/watchdog/renesas_wdt.cmodified+27−6View file
drivers/watchdog/sirfsoc_wdt.cdeleted+0−216View before deletion
drivers/watchdog/tangox_wdt.cdeleted+0−209View before deletion
drivers/watchdog/watchdog_core.cmodified+1−1View file
drivers/watchdog/ziirave_wdt.cmodified+0−1View file
drivers/watchdog/zx2967_wdt.cdeleted+0−279View before deletion
include/dt-bindings/reset-controller/mt8192-resets.hadded+30−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

View file
diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
index 5ac607d..9aa3c31 100644
--- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -19,13 +19,11 @@ properties:
- const: allwinner,sun4i-a10-wdt
- const: allwinner,sun6i-a31-wdt
- items:
- - const: allwinner,sun50i-a64-wdt
- - const: allwinner,sun6i-a31-wdt
- - items:
- - const: allwinner,sun50i-a100-wdt
- - const: allwinner,sun6i-a31-wdt
- - items:
- - const: allwinner,sun50i-h6-wdt
+ - enum:
+ - allwinner,sun50i-a64-wdt
+ - allwinner,sun50i-a100-wdt
+ - allwinner,sun50i-h6-wdt
+ - allwinner,sun50i-h616-wdt
- const: allwinner,sun6i-a31-wdt
- items:
- const: allwinner,suniv-f1c100s-wdt

Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml

View file
diff --git a/Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml b/Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml
new file mode 100644
index 0000000..1437ff8
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/intel,keembay-wdt.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/intel,keembay-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel Keem Bay SoC non-secure Watchdog Timer
+
+maintainers:
+ - Wan Ahmad Zainie <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - intel,keembay-wdt
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ items:
+ - description: interrupt specifier for threshold interrupt line
+ - description: interrupt specifier for timeout interrupt line
+
+ interrupt-names:
+ items:
+ - const: threshold
+ - const: timeout
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #define KEEM_BAY_A53_TIM
+
+ watchdog: watchdog@2033009c {
+ compatible = "intel,keembay-wdt";
+ reg = <0x2033009c 0x10>;
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "threshold", "timeout";
+ clocks = <&scmi_clk KEEM_BAY_A53_TIM>;
+ };
+
+...

Documentation/devicetree/bindings/watchdog/mtk-wdt.txt

View file
diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 4dd36bd..e36ba60 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -4,14 +4,15 @@ Required properties:
- compatible should contain:
"mediatek,mt2701-wdt", "mediatek,mt6589-wdt": for MT2701
- "mediatek,mt2712-wdt", "mediatek,mt6589-wdt": for MT2712
+ "mediatek,mt2712-wdt": for MT2712
"mediatek,mt6589-wdt": for MT6589
"mediatek,mt6797-wdt", "mediatek,mt6589-wdt": for MT6797
"mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622
"mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623
"mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629
- "mediatek,mt8183-wdt", "mediatek,mt6589-wdt": for MT8183
+ "mediatek,mt8183-wdt": for MT8183
"mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516
+ "mediatek,mt8192-wdt": for MT8192
- reg : Specifies base physical address and size of the registers.

Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml

View file
diff --git a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
index 6933005..ab66d3f 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/renesas,wdt.yaml
@@ -50,6 +50,7 @@ properties:
- renesas,r8a77980-wdt # R-Car V3H
- renesas,r8a77990-wdt # R-Car E3
- renesas,r8a77995-wdt # R-Car D3
+ - renesas,r8a779a0-wdt # R-Car V3U
- const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2
reg:

Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txt b/Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txt
deleted file mode 100644
index 5b7ec2c..0000000
--- a/Documentation/devicetree/bindings/watchdog/sigma,smp8642-wdt.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-Sigma Designs SMP86xx/SMP87xx watchdog
-
-Required properties:
-- compatible: Should be "sigma,smp8642-wdt"
-- reg: Specifies the physical address region
-- clocks: Should be a phandle to the clock
-
-Optional properties:
-- timeout-sec: watchdog timeout in seconds
-
-Example:
-
-watchdog@1fd00 {
- compatible = "sigma,smp8642-wdt";
- reg = <0x1fd00 8>;
- clocks = <&xtal_in_clk>;
- timeout-sec = <30>;
-};

Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
deleted file mode 100644
index 0dce5e3..0000000
--- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-SiRFSoC Timer and Watchdog Timer(WDT) Controller
-
-Required properties:
-- compatible: "sirf,prima2-tick"
-- reg: Address range of tick timer/WDT register set
-- interrupts: interrupt number to the cpu
-
-Optional properties:
-- timeout-sec : Contains the watchdog timeout in seconds
-
-Example:
-
-timer@b0020000 {
- compatible = "sirf,prima2-tick";
- reg = <0xb0020000 0x1000>;
- interrupts = <0>;
- timeout-sec = <30>;
-};

Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml

View file
diff --git a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
index f7ee922..b58596b 100644
--- a/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml
@@ -18,10 +18,16 @@ properties:
- const: snps,dw-wdt
- items:
- enum:
+ - rockchip,px30-wdt
- rockchip,rk3066-wdt
- rockchip,rk3188-wdt
+ - rockchip,rk3228-wdt
- rockchip,rk3288-wdt
+ - rockchip,rk3308-wdt
+ - rockchip,rk3328-wdt
- rockchip,rk3368-wdt
+ - rockchip,rk3399-wdt
+ - rockchip,rv1108-wdt
- const: snps,dw-wdt
reg:

Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
deleted file mode 100644
index 8ffb88e..0000000
--- a/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-ST-Ericsson COH 901 327 Watchdog timer
-
-Required properties:
-- compatible: must be "stericsson,coh901327".
-- reg: physical base address of the controller and length of memory mapped
- region.
-- interrupts: the interrupt used for the watchdog timeout warning.
-
-Optional properties:
-- timeout-sec: contains the watchdog timeout in seconds.
-
-Example:
-
-watchdog: watchdog@c0012000 {
- compatible = "stericsson,coh901327";
- reg = <0xc0012000 0x1000>;
- interrupts = <3>;
- timeout-sec = <60>;
-};

Documentation/devicetree/bindings/watchdog/zte,zx2967-wdt.txt

View before deletion
diff --git a/Documentation/devicetree/bindings/watchdog/zte,zx2967-wdt.txt b/Documentation/devicetree/bindings/watchdog/zte,zx2967-wdt.txt
deleted file mode 100644
index 06ce677..0000000
--- a/Documentation/devicetree/bindings/watchdog/zte,zx2967-wdt.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-ZTE zx2967 Watchdog timer
-
-Required properties:
-
-- compatible : should be one of the following.
- * zte,zx296718-wdt
-- reg : Specifies base physical address and size of the registers.
-- clocks : Pairs of phandle and specifier referencing the controller's clocks.
-- resets : Reference to the reset controller controlling the watchdog
- controller.
-
-Optional properties:
-
-- timeout-sec : Contains the watchdog timeout in seconds.
-- zte,wdt-reset-sysctrl : Directs how to reset system by the watchdog.
- if we don't want to restart system when watchdog been triggered,
- it's not required, vice versa.
- It should include following fields.
- * phandle of aon-sysctrl.
- * offset of register that be written, should be 0xb0.
- * configure value that be written to aon-sysctrl.
- * bit mask, corresponding bits will be affected.
-
-Example:
-
-wdt: watchdog@1465000 {
- compatible = "zte,zx296718-wdt";
- reg = <0x1465000 0x1000>;
- clocks = <&topcrm WDT_WCLK>;
- resets = <&toprst 35>;
- zte,wdt-reset-sysctrl = <&aon_sysctrl 0xb0 1 0x115>;
-};

drivers/watchdog/Kconfig

View file
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 6b9e93d..1fe0042 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -254,17 +254,6 @@ config MENZ069_WATCHDOG
This driver can also be built as a module. If so the module
will be called menz069_wdt.
-config TANGOX_WATCHDOG
- tristate "Sigma Designs SMP86xx/SMP87xx watchdog"
- select WATCHDOG_CORE
- depends on ARCH_TANGO || COMPILE_TEST
- depends on HAS_IOMEM
- help
- Support for the watchdog in Sigma Designs SMP86xx (tango3)
- and SMP87xx (tango4) family chips.
-
- This driver can be built as a module. The module name is tangox_wdt.
-
config WDAT_WDT
tristate "ACPI Watchdog Action Table (WDAT)"
depends on ACPI
@@ -630,17 +619,6 @@ config SUNXI_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called sunxi_wdt.
-config COH901327_WATCHDOG
- bool "ST-Ericsson COH 901 327 watchdog"
- depends on ARCH_U300 || (ARM && COMMON_CLK && COMPILE_TEST)
- default y if MACH_U300
- select WATCHDOG_CORE
- help
- Say Y here to include Watchdog timer support for the
- watchdog embedded into the ST-Ericsson U300 series platforms.
- This watchdog is used to reset the system and thus cannot be
- compiled as a module.
-
config NPCM7XX_WATCHDOG
tristate "Nuvoton NPCM750 watchdog"
depends on ARCH_NPCM || COMPILE_TEST
@@ -788,16 +766,6 @@ config MOXART_WDT
To compile this driver as a module, choose M here: the
module will be called moxart_wdt.
-config SIRFSOC_WATCHDOG
- tristate "SiRFSOC watchdog"
- depends on HAS_IOMEM
- depends on ARCH_SIRF || COMPILE_TEST
- select WATCHDOG_CORE
- default y
- help
- Support for CSR SiRFprimaII and SiRFatlasVI watchdog. When
- the watchdog triggers the system will be reset.
-
config ST_LPC_WATCHDOG
tristate "STMicroelectronics LPC Watchdog"
depends on ARCH_STI || COMPILE_TEST
@@ -900,16 +868,6 @@ config LPC18XX_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called lpc18xx_wdt.
-config ATLAS7_WATCHDOG
- tristate "CSRatlas7 watchdog"
- depends on ARCH_ATLAS7 || COMPILE_TEST
- help
- Say Y here to include Watchdog timer support for the watchdog
- existing on the CSRatlas7 series platforms.
-
- To compile this driver as a module, choose M here: the
- module will be called atlas7_wdt.
-
config RENESAS_WDT
tristate "Renesas WDT Watchdog"
depends on ARCH_RENESAS || COMPILE_TEST
@@ -939,16 +897,6 @@ config ASPEED_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called aspeed_wdt.
-config ZX2967_WATCHDOG
- tristate "ZTE zx2967 SoCs watchdog support"
- depends on ARCH_ZX
- select WATCHDOG_CORE
- help
- Say Y here to include support for the watchdog timer
- in ZTE zx2967 SoCs.
- To compile this driver as a module, choose M here: the
- module will be called zx2967_wdt.
-
config STM32_WATCHDOG
tristate "STM32 Independent WatchDoG (IWDG) support"
depends on ARCH_STM32
@@ -2146,4 +2094,17 @@ config USBPCWATCHDOG
Most people will say N.
+config KEEMBAY_WATCHDOG
+ tristate "Intel Keem Bay SoC non-secure watchdog"
+ depends on ARCH_KEEMBAY || (ARM64 && COMPILE_TEST)
+ select WATCHDOG_CORE
+ help
+ This option enable support for an In-secure watchdog timer driver for
+ Intel Keem Bay SoC. This WDT has a 32 bit timer and decrements in every
+ count unit. An interrupt will be triggered, when the count crosses
+ the thershold configured in the register.
+
+ To compile this driver as a module, choose M here: the
+ module will be called keembay_wdt.
+
endif # WATCHDOG

drivers/watchdog/Makefile

View file
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index 74f61e4..f3a6540 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -61,7 +61,6 @@ obj-$(CONFIG_K3_RTI_WATCHDOG) += rti_wdt.o
obj-$(CONFIG_ORION_WATCHDOG) += orion_wdt.o
obj-$(CONFIG_SUNXI_WATCHDOG) += sunxi_wdt.o
obj-$(CONFIG_RN5T618_WATCHDOG) += rn5t618_wdt.o
-obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o
obj-$(CONFIG_NPCM7XX_WATCHDOG) += npcm_wdt.o
obj-$(CONFIG_STMP3XXX_RTC_WATCHDOG) += stmp3xxx_rtc_wdt.o
obj-$(CONFIG_TS4800_WATCHDOG) += ts4800_wdt.o
@@ -73,7 +72,6 @@ obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o
obj-$(CONFIG_MOXART_WDT) += moxart_wdt.o
-obj-$(CONFIG_SIRFSOC_WATCHDOG) += sirfsoc_wdt.o
obj-$(CONFIG_ST_LPC_WATCHDOG) += st_lpc_wdt.o
obj-$(CONFIG_QCOM_WDT) += qcom-wdt.o
obj-$(CONFIG_BCM_KONA_WDT) += bcm_kona_wdt.o
@@ -84,11 +82,9 @@ obj-$(CONFIG_MEDIATEK_WATCHDOG) += mtk_wdt.o
obj-$(CONFIG_DIGICOLOR_WATCHDOG) += digicolor_wdt.o
obj-$(CONFIG_LPC18XX_WATCHDOG) += lpc18xx_wdt.o
obj-$(CONFIG_BCM7038_WDT) += bcm7038_wdt.o
-obj-$(CONFIG_ATLAS7_WATCHDOG) += atlas7_wdt.o
obj-$(CONFIG_RENESAS_WDT) += renesas_wdt.o
obj-$(CONFIG_RENESAS_RZAWDT) += rza_wdt.o
obj-$(CONFIG_ASPEED_WATCHDOG) += aspeed_wdt.o
-obj-$(CONFIG_ZX2967_WATCHDOG) += zx2967_wdt.o
obj-$(CONFIG_STM32_WATCHDOG) += stm32_iwdg.o
obj-$(CONFIG_UNIPHIER_WATCHDOG) += uniphier_wdt.o
obj-$(CONFIG_RTD119X_WATCHDOG) += rtd119x_wdt.o
@@ -145,6 +141,7 @@ obj-$(CONFIG_INTEL_MEI_WDT) += mei_wdt.o
obj-$(CONFIG_NI903X_WDT) += ni903x_wdt.o
obj-$(CONFIG_NIC7018_WDT) += nic7018_wdt.o
obj-$(CONFIG_MLX_WDT) += mlx_wdt.o
+obj-$(CONFIG_KEEMBAY_WATCHDOG) += keembay_wdt.o
# M68K Architecture
obj-$(CONFIG_M54xx_WATCHDOG) += m54xx_wdt.o
@@ -212,7 +209,6 @@ obj-$(CONFIG_DA9055_WATCHDOG) += da9055_wdt.o
obj-$(CONFIG_DA9062_WATCHDOG) += da9062_wdt.o
obj-$(CONFIG_DA9063_WATCHDOG) += da9063_wdt.o
obj-$(CONFIG_GPIO_WATCHDOG) += gpio_wdt.o
-obj-$(CONFIG_TANGOX_WATCHDOG) += tangox_wdt.o
obj-$(CONFIG_WDAT_WDT) += wdat_wdt.o
obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o
obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o

drivers/watchdog/atlas7_wdt.c

View before deletion
diff --git a/drivers/watchdog/atlas7_wdt.c b/drivers/watchdog/atlas7_wdt.c
deleted file mode 100644
index 9bfe650..0000000
--- a/drivers/watchdog/atlas7_wdt.c
+++ /dev/null
@@ -1,221 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Watchdog driver for CSR Atlas7
- *
- * Copyright (c) 2015 Cambridge Silicon Radio Limited, a CSR plc group company.
- */
-
-#include <linux/clk.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/of.h>
-#include <linux/platform_device.h>
-#include <linux/watchdog.h>
-
-#define ATLAS7_TIMER_WDT_INDEX 5
-#define ATLAS7_WDT_DEFAULT_TIMEOUT 20
-
-#define ATLAS7_WDT_CNT_CTRL (0 + 4 * ATLAS7_TIMER_WDT_INDEX)
-#define ATLAS7_WDT_CNT_MATCH (0x18 + 4 * ATLAS7_TIMER_WDT_INDEX)
-#define ATLAS7_WDT_CNT (0x48 + 4 * ATLAS7_TIMER_WDT_INDEX)
-#define ATLAS7_WDT_CNT_EN (BIT(0) | BIT(1))
-#define ATLAS7_WDT_EN 0x64
-
-static unsigned int timeout = ATLAS7_WDT_DEFAULT_TIMEOUT;
-static bool nowayout = WATCHDOG_NOWAYOUT;
-
-module_param(timeout, uint, 0);
-module_param(nowayout, bool, 0);
-
-MODULE_PARM_DESC(timeout, "Default watchdog timeout (in seconds)");
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
- __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
-
-struct atlas7_wdog {
- struct device *dev;
- void __iomem *base;
- unsigned long tick_rate;
- struct clk *clk;
-};
-
-static unsigned int atlas7_wdt_gettimeleft(struct watchdog_device *wdd)
-{
- struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd);
- u32 counter, match, delta;
-
- counter = readl(wdt->base + ATLAS7_WDT_CNT);
- match = readl(wdt->base + ATLAS7_WDT_CNT_MATCH);
- delta = match - counter;
-
- return delta / wdt->tick_rate;
-}
-
-static int atlas7_wdt_ping(struct watchdog_device *wdd)
-{
- struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd);
- u32 counter, match, delta;
-
- counter = readl(wdt->base + ATLAS7_WDT_CNT);
- delta = wdd->timeout * wdt->tick_rate;
- match = counter + delta;
-
- writel(match, wdt->base + ATLAS7_WDT_CNT_MATCH);
-
- return 0;
-}
-
-static int atlas7_wdt_enable(struct watchdog_device *wdd)
-{
- struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd);
-
- atlas7_wdt_ping(wdd);
-
- writel(readl(wdt->base + ATLAS7_WDT_CNT_CTRL) | ATLAS7_WDT_CNT_EN,
- wdt->base + ATLAS7_WDT_CNT_CTRL);
- writel(1, wdt->base + ATLAS7_WDT_EN);
-
- return 0;
-}
-
-static int atlas7_wdt_disable(struct watchdog_device *wdd)
-{
- struct atlas7_wdog *wdt = watchdog_get_drvdata(wdd);
-
- writel(0, wdt->base + ATLAS7_WDT_EN);
- writel(readl(wdt->base + ATLAS7_WDT_CNT_CTRL) & ~ATLAS7_WDT_CNT_EN,
- wdt->base + ATLAS7_WDT_CNT_CTRL);
-
- return 0;
-}
-
-static int atlas7_wdt_settimeout(struct watchdog_device *wdd, unsigned int to)
-{
- wdd->timeout = to;
-
- return 0;
-}
-
-#define OPTIONS (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE)
-
-static const struct watchdog_info atlas7_wdt_ident = {
- .options = OPTIONS,
- .firmware_version = 0,
- .identity = "atlas7 Watchdog",
-};
-
-static const struct watchdog_ops atlas7_wdt_ops = {
- .owner = THIS_MODULE,
- .start = atlas7_wdt_enable,
- .stop = atlas7_wdt_disable,
- .get_timeleft = atlas7_wdt_gettimeleft,
- .ping = atlas7_wdt_ping,
- .set_timeout = atlas7_wdt_settimeout,
-};
-
-static struct watchdog_device atlas7_wdd = {
- .info = &atlas7_wdt_ident,
- .ops = &atlas7_wdt_ops,
- .timeout = ATLAS7_WDT_DEFAULT_TIMEOUT,
-};
-
-static const struct of_device_id atlas7_wdt_ids[] = {
- { .compatible = "sirf,atlas7-tick"},
- {}
-};
-
-static void atlas7_clk_disable_unprepare(void *data)
-{
- clk_disable_unprepare(data);
-}
-
-static int atlas7_wdt_probe(struct platform_device *pdev)
-{
- struct device *dev = &pdev->dev;
- struct atlas7_wdog *wdt;
- struct clk *clk;
- int ret;
-
- wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
- if (!wdt)
- return -ENOMEM;
- wdt->base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(wdt->base))
- return PTR_ERR(wdt->base);
-
- clk = devm_clk_get(dev, NULL);
- if (IS_ERR(clk))
- return PTR_ERR(clk);
- ret = clk_prepare_enable(clk);
- if (ret) {
- dev_err(dev, "clk enable failed\n");
- return ret;
- }
- ret = devm_add_action_or_reset(dev, atlas7_clk_disable_unprepare, clk);
- if (ret)
- return ret;
-
- /* disable watchdog hardware */
- writel(0, wdt->base + ATLAS7_WDT_CNT_CTRL);
-
- wdt->tick_rate = clk_get_rate(clk);
- if (!wdt->tick_rate)
- return -EINVAL;
-
- wdt->clk = clk;
- atlas7_wdd.min_timeout = 1;
- atlas7_wdd.max_timeout = UINT_MAX / wdt->tick_rate;
-
- watchdog_init_timeout(&atlas7_wdd, 0, dev);
- watchdog_set_nowayout(&atlas7_wdd, nowayout);
-
- watchdog_set_drvdata(&atlas7_wdd, wdt);
- platform_set_drvdata(pdev, &atlas7_wdd);
-
- watchdog_stop_on_reboot(&atlas7_wdd);
- watchdog_stop_on_unregister(&atlas7_wdd);
- return devm_watchdog_register_device(dev, &atlas7_wdd);
-}
-
-static int __maybe_unused atlas7_wdt_suspend(struct device *dev)
-{
- /*
- * NOTE:timer controller registers settings are saved
- * and restored back by the timer-atlas7.c
- */

This diff is incomplete. Download the complete patch.

drivers/watchdog/coh901327_wdt.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/watchdog/hpwdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/it8712f_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/keembay_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/mei_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/mtk_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/qcom-wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/renesas_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/sirfsoc_wdt.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/watchdog/tangox_wdt.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/watchdog/watchdog_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/ziirave_wdt.c

View file

This diff is incomplete. Download the complete patch.

drivers/watchdog/zx2967_wdt.c

View before deletion

This diff is incomplete. Download the complete patch.

include/dt-bindings/reset-controller/mt8192-resets.h

View file

This diff is incomplete. Download the complete patch.