watchdog - v3.14-rc1 merge window
Subsystems (8)
Hi Linus,
Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git
This series contains:
* new driver for bcm281xx watchdog device
* new driver for gpio based watchdog devices
* remove DEFINE_PCI_DEVICE_TABLE macro for watchdog device drivers
* conversion of davinci_wdt and mpc8xxx_wdt to watchdog core
* improvements on davinci_wdt, at91/dt, at91sam9_wdt and s3c2410_wdt
* Auto-detect IO address and expand supported chips on w836* super-I/O chipsets
* core: Make dt "timeout-sec" property work on drivers w/out min/max
* fix Kconfig dependencies
* sirf: Remove redundant of_match_ptr helper
* mach-moxart: add restart handler
* hpwdt patch to display better panic information
* imx2_wdt: disable watchdog timer during low power mode
This will update the following files:
Documentation/devicetree/bindings/watchdog/atmel-wdt.txt | 30 - Documentation/devicetree/bindings/watchdog/davinci-wdt.txt | 15 Documentation/devicetree/bindings/watchdog/gpio-wdt.txt | 23 Documentation/devicetree/bindings/watchdog/samsung-wdt.txt | 20 arch/arm/boot/dts/at91sam9260.dtsi | 5 arch/arm/boot/dts/at91sam9263.dtsi | 5 arch/arm/boot/dts/at91sam9g45.dtsi | 5 arch/arm/boot/dts/at91sam9n12.dtsi | 5 arch/arm/boot/dts/at91sam9x5.dtsi | 5 arch/arm/boot/dts/kizbox.dts | 6 arch/arm/boot/dts/sama5d3.dtsi | 5 arch/arm/configs/bcm_defconfig | 3 drivers/watchdog/Kconfig | 59 +- drivers/watchdog/Makefile | 2 drivers/watchdog/alim1535_wdt.c | 2 drivers/watchdog/alim7101_wdt.c | 2 drivers/watchdog/at91sam9_wdt.c | 320 ++++++++--- drivers/watchdog/bcm_kona_wdt.c | 368 +++++++++++++ drivers/watchdog/davinci_wdt.c | 221 +++---- drivers/watchdog/dw_wdt.c | 2 drivers/watchdog/gpio_wdt.c | 254 ++++++++ drivers/watchdog/hpwdt.c | 13 drivers/watchdog/i6300esb.c | 2 drivers/watchdog/imx2_wdt.c | 4 drivers/watchdog/moxart_wdt.c | 15 drivers/watchdog/mpc8xxx_wdt.c | 110 +-- drivers/watchdog/nv_tco.c | 2 drivers/watchdog/pcwd_pci.c | 2 drivers/watchdog/s3c2410_wdt.c | 203 ++++++- drivers/watchdog/sirfsoc_wdt.c | 2 drivers/watchdog/sp5100_tco.c | 2 drivers/watchdog/via_wdt.c | 2 drivers/watchdog/w83627hf_wdt.c | 234 +++++++- drivers/watchdog/watchdog_core.c | 4 drivers/watchdog/wdt_pci.c | 2 35 files changed, 1598 insertions(+), 356 deletions(-)
with these Changes:
commit ea3d4011a871e1802e201086195c61e6dbeaf6d5
Author: Guenter Roeck <[email protected]> Date: Sat Aug 17 13:58:46 2013 -0700
watchdog: w83627hf_wdt: Reset watchdog trigger during initialization
If the watchdog has already triggered for whatever reason, it won't restart unless the trigger is reset.
commit 7b6d0b6ad49e55f8b82dbf233ece4e091417a738
Author: Guenter Roeck <[email protected]> Date: Sat Aug 17 13:58:44 2013 -0700
watchdog: w83627hf: Add support for W83697HF and W83697UG
Major difference is that the watchdog control and counter registers are different on both chips.
commit 962c04f54e4a3c322d19b47256f9aec0b9c8124e
Author: Guenter Roeck <[email protected]> Date: Sat Aug 17 13:58:43 2013 -0700
watchdog: w83627hf: Auto-detect IO address and supported chips
Instead of requiring the user to provide an IO address per module parameter, auto-detect it as well as supported chips.
commit f72fa00f8ab216ee484d61de17ddc84712456c3a
Author: Boris BREZILLON <[email protected]> Date: Sun Nov 3 18:52:44 2013 +0100
watchdog: at91sam9_wdt: increase security margin on watchdog counter reset
Try to reset the watchdog counter 4 or 2 times more often than actually requested, to avoid spurious watchdog reset.
If this is not possible because of the min_heartbeat value, reset it at the min_heartbeat period.
commit a04c3f01d33f4661424deeff67913699a0910c53
Author: Boris BREZILLON <[email protected]> Date: Sun Nov 3 18:52:43 2013 +0100
watchdog: at91sam9_wdt: avoid spurious watchdog reset during init
Use the min_heartbeat value instead of the calculated heartbeat value for the first watchdog reset to avoid spurious watchdog reset.
Resetting the watchdog counter during init might lead to a watchdog fault reset because the watchdog counter has to be running for at least min_heartbeat.
Resetting the watchdog counter after heartbeat might lead to a watchdog timeout reset because the watchdog counter is running for more than max_heartbeat time.
Using min_heartbeat instead of heartbeat does not guarantee that the watchdog won't trigger a reset, but at least it reduces the chances to be in such a case.
commit 1444797fc178b58e91cf29a438efd05dd890d43a
Author: Boris BREZILLON <[email protected]> Date: Sun Nov 3 18:52:42 2013 +0100
watchdog: at91sam9_wdt: fix secs_to_ticks
Fix the secs_to_ticks macro in case 0 is passed as an argument.
commit 705b675db92bbbda47507205a37784d2d0ab8c0d
Author: Boris BREZILLON <[email protected]> Date: Fri Oct 4 09:24:15 2013 +0200
ARM: at91/dt: add watchdog properties to kizbox board
Add watchdog specific config for kizbox board.
commit fe46aa679f12c6e43039a2a3255ea47e47dcef52
Author: Boris BREZILLON <[email protected]> Date: Fri Oct 4 09:24:14 2013 +0200
ARM: at91/dt: add sam9 watchdog default options to SoCs
Set default watchdog options in every SoC compatible with the sam9 watchdog.
commit 6914c5873c227f0eb03e3860a1cf95a930a06f31
Author: Boris BREZILLON <[email protected]> Date: Fri Oct 4 09:24:13 2013 +0200
watchdog: at91sam9_wdt: update device tree doc
Add new at91sam9 watchdog properties to the documentation.
commit 5161b31dc39a6d6dadc95f298de48a725b73ada8
Author: Boris BREZILLON <[email protected]> Date: Fri Oct 4 09:24:12 2013 +0200
watchdog: at91sam9_wdt: better watchdog support
The at91sam9 watchdog timer can only be configured once, and the current implementation tries to configure it in a static way:
- 2 seconds timeout
- wdt restart every 500ms
If the timer has already been configured with different values, it returns an error and do not create any watchdog device.
This is not critical if the watchdog is disabled, but if it has been enabled with different timeout values it will lead to a SoC reset.
This patch series tries to address this issue by adapting the heartbeat value according the WDT timer config:
- it first tries to configure the timer as requested.
- if it fails it fallbacks to the current config, adapting its heartbeat timer to the needs
This patch series also move to a dynamically allocated at91wdt device instead of the static instance.
It adds a new at91 wdt type: software. This new type make use of the at91 wdt interrupt to trigger a software reboot.
Finally it adds several properties to the device tree bindings.
commit e30722e49783ed5ea56b5737a2821d022c4e915e
Author: Naresh Bhat <[email protected]> Date: Wed Jan 22 18:14:03 2014 +0530
watchdog: sp805_wdt depends also on ARM64
Add sp805_wdt depends on ARM64.
commit 8773926d7135bb2d4e933272cd4c0c3aa5c4a088
Author: Jonas Jensen <[email protected]> Date: Wed Dec 18 16:18:03 2013 +0100
watchdog: mach-moxart: add restart handler
mach-moxart lacks a separate register for reset; as a workaround, add a function that can be hooked to arm_pm_restart.
commit d5cfaf0a8554ad6b0e74955c7217ed24b2cadc9b
Author: Christophe Leroy <[email protected]> Date: Wed Dec 4 07:32:14 2013 +0100
watchdog: mpc8xxx_wdt convert to watchdog core
Convert mpc8xxx_wdt.c to the new watchdog API.
commit 15edd9eedd61ac7be53d63ffa6a7208d4479cece
Author: Sachin Kamat <[email protected]> Date: Sat Dec 21 14:01:13 2013 +0530
watchdog: sirf: Remove redundant of_match_ptr helper
'sirfsoc_wdt_of_match' is always compiled in. Hence the helper macro is not needed.
commit 7bb5be947e5a32f3b4c1c5cad3bf47e9b5a26db0
Author: Thomas Mingarelli <[email protected]> Date: Tue Jan 28 21:26:10 2014 +0100
watchdog: hpwdt patch to display informative string
This patch is being submitted to output a general string when the panic comes in that informs the user of the possible places to look for the source of the NMI. Because various systems log the message in different places this would give a single display of where to go look instead of code that acts on all these different server names or IDs.
commit 58a251f2c25a5305b6b18be7e576b75f6f9ce187
Author: Baruch Siach <[email protected]> Date: Mon Dec 30 14:25:54 2013 +0200
watchdog: dw_wdt: remove build dependencies
There is nothing ARM specific in this driver, and we intend to use it on the Xtensa architecture. Also, clk.h now includes stubs for !CONFIG_HAVE_CLK, so the driver should build anyway.
commit 1a9c5efa576eccadd2836a1e53dcea21f999c180
Author: Anson Huang <[email protected]> Date: Mon Jan 13 19:58:34 2014 +0800
watchdog: imx2_wdt: disable watchdog timer during low power mode
We should set watchdog timer to be disabled in low power mode, as there is no service running in background, otherwise, system will reset unexpected.
commit cffc9a60ebac3b560a370553abd885fa43d8b286
Author: Doug Anderson <[email protected]> Date: Fri Dec 6 13:08:07 2013 -0800
watchdog: s3c2410_wdt: Report when the watchdog reset the system
A good watchdog driver is supposed to report when it was responsible for resetting the system. Implement this for the s3c2410, at least on exynos5250 and exynos5420 where we already have a pointer to the PMU registers to read the information.
Note that exynos4 SoCs also provide the reset status, but providing that is left as an exercise for future changes and is not plumbed up in this patch series. Also note the exynos4 SoCs don't appear to need any PMU config, which is why this patch separates the concepts of having PMU Registers vs. needing PMU Config.
commit 4f1f653a68d67ca5732fdd7ee4deb290a3ea5149
Author: Leela Krishna Amudala <[email protected]> Date: Fri Dec 6 11:17:47 2013 +0530
watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register
Add device tree support for exynos5250 and 5420 SoCs and use syscon regmap interface to configure AUTOMATIC_WDT_RESET_DISABLE and MASK_WDT_RESET_REQUEST registers of PMU to mask/unmask enable/disable of watchdog in probe and s2r scenarios.
commit 178624403c04a4af315583eaf75ebb8545474544
Author: Doug Anderson <[email protected]> Date: Tue Nov 26 16:57:19 2013 -0800
watchdog: s3c2410_wdt: Handle rounding a little better for timeout
The existing watchdog timeout worked OK but didn't deal with rounding in an ideal way when dividing out all of its clocks.
Specifically if you had a timeout of 32 seconds and an input clock of 66666666, you'd end up setting a timeout of 31.9998 seconds and reporting a timeout of 31 seconds.
Specifically DBG printouts showed:
s3c2410wdt_set_heartbeat: count=16666656, timeout=32, freq=520833
s3c2410wdt_set_heartbeat: timeout=32, divisor=255, count=16666656 (0000ff4f)
and the final timeout reported to the user was:
((count / divisor) * divisor) / freq
(0xff4f * 255) / 520833 = 31 (truncated from 31.9998)
the technically "correct" value is:
(0xff4f * 255) / (66666666.0 / 128) = 31.9998
By using "DIV_ROUND_UP" we can be a little more correct.
s3c2410wdt_set_heartbeat: count=16666688, timeout=32, freq=520834
s3c2410wdt_set_heartbeat: timeout=32, divisor=255, count=16666688 (0000ff50)
and the final timeout reported to the user:
(0xff50 * 255) / 520834 = 32
the technically "correct" value is:
(0xff50 * 255) / (66666666.0 / 128) = 32.0003
We'll use a DIV_ROUND_UP to solve this, generally erroring on the side of reporting shorter values to the user and setting the watchdog to slightly longer than requested:
* Round input frequency up to assume watchdog is counting faster.
* Round divisions by divisor up to give us extra time.
At the same time we can avoid a for loop by just doing the right math.
commit 0f1dd98d896efb956d474754b5d2f0c420d40192
Author: Doug Anderson <[email protected]> Date: Mon Nov 25 15:36:43 2013 -0800
watchdog: s3c2410_wdt: Only register for cpufreq on ARM_S3C24XX_CPUFREQ
On modern SoCs the watchdog timer is parented on a clock that doesn't change every time we have a cpufreq change. That means we don't need to constantly adjust the watchdog timer, so avoid registering for and dealing with cpufreq transitions unless we've actually got CONFIG_ARM_S3C24XX_CPUFREQ defined.
Note that this is more than just an optimization. The s3c2410 watchdog driver actually pats the watchdog on every CPU frequency change. On modern systems these happen many times per second (even in a system where "nothing" is happening). That effectively makes any userspace watchdog program useless (the watchdog is constantly patted by the kernel). If we need ARM_S3C24XX_CPUFREQ defined on a multiplatform kernel we'll need to make sure that kernel supports common clock and change this to user common clock framework.
commit 25134eafb05eef6dd4b6caee3a711b63ee0c3737
Author: Alexander Shiyan <[email protected]> Date: Sat Nov 30 11:54:32 2013 +0400
watchdog: GPIO-controlled watchdog
This patch adds a watchdog driver for devices controlled through GPIO, (Analog Devices ADM706, Maxim MAX823, National NE555 etc).
commit 8832b20093434514fda5e8a0c885270eda4fbf40
Author: Ivan Khoronzhuk <[email protected]> Date: Wed Dec 4 21:39:30 2013 +0200
watchdog: davinci: reuse driver for keystone arch
The keystone arch uses the same IP watchdog, so add "ti,keystone-wdt" compatible and correct identity.
The Keystone arch is using clocks in DT and source clock for watchdog has to be specified, so add this to binding.
commit 4fa5daa9c618e3411a351c326c34916b65ee7ae6
Author: Ivan Khoronzhuk <[email protected]> Date: Wed Dec 4 21:39:29 2013 +0200
watchdog: davinci: add "timeout-sec" property
Since Davinci WDT has been switched to use WDT core, it became able to support timeout-sec property, so add it to it's binding description.
commit a771994901bde73779c94ec558b95c75bc2c7518
Author: Ivan Khoronzhuk <[email protected]> Date: Wed Dec 4 21:39:28 2013 +0200
watchdog: davinci: add GET_TIMELEFT option support
Currently, the davinci watchdog can be read while counting, so we can add ability to report the remaining time before the system will reboot.
commit 6d9a6cf5c63fe4f08b05fc53f7a17048df86d3ac
Author: Ivan Khoronzhuk <[email protected]> Date: Wed Dec 4 21:39:27 2013 +0200
watchdog: davinci: use davinci_wdt_device structure to hold device data
Some SoCs, like Keystone 2, can support more than one WDT and each watchdog device has to use it's own base address, clock source, watchdog device, so add new davinci_wdt_device structure to hold device data.
commit f48f3ceabf2ce4fb5b8aa0672166e1e9001946b9
Author: Ivan Khoronzhuk <[email protected]> Date: Thu Dec 5 13:26:24 2013 +0200
watchdog: davinci: change driver to use WDT core
To reduce code duplicate and increase code readability use WDT core code to handle WDT interface.
Remove io_lock as the WDT core uses mutex to lock each wdt device. Remove wdt_state as the WDT core tracks state with its own variable.
The watchdog_init_timeout() can read timeout value from timeout-sec property if the passed value is out of bounds. The heartbeat is initialized in next way. If heartbeat is not set thought module parameter, try to read it's value from WDT node timeout-sec property. If node has no one, use default value.
The heartbeat is hold in wdd->timeout by WDT core, so use it in order to set timeout period.
Davinci WDT can't be stopped and once it's expired - it can be rearmed only after hardware reset, that's why nowayout feature is enforced.
commit 6e2ac20e9c47cf26a1dd5a0f05b93ef0afd3c1c5
Author: Markus Mayer <[email protected]> Date: Mon Jan 6 13:56:10 2014 -0800
watchdog: bcm281xx: Debugfs support
This change introduces debugfs support for the BCM281xx watchdog driver.
commit 6adb730dc2085c16c52a2f991cc1661e4a7fd6d5
Author: Markus Mayer <[email protected]> Date: Fri Nov 22 14:56:03 2013 -0800
watchdog: bcm281xx: Watchdog Driver
This commit adds support for the watchdog timer used on the BCM281xx family of SoCs.
commit 2c34d59916bd82efe6544f39ec162e8c9236009d
Author: Doug Anderson <[email protected]> Date: Tue Nov 26 10:22:52 2013 -0800
watchdog: core: Make dt "timeout-sec" property work on drivers w/out min/max
It is valid for a watchdog driver to have 0 for a "min" and "max" timeout if the driver doesn't need the core to enforce the concepts of min and max. The s3c2410_wdt driver is one such driver. Specifically it can be hard for that driver to come up with a static "max" on all platforms without a lot more information since the input clock on S3C2410 and S3C2440 can change with DVFS.
As written, watchdog_init_timeout() will not ever read "timeout-sec" on these drivers since watchdog_timeout_invalid() will _never_ return true. Change to not consider a timeout_parm of 0 as valid even if min/max aren't specified by the driver. Also handle the case when there is no min/max and no "timeout-sec" property.
commit bc17f9dcb11dfe7a5f02103da51f580d62a6df2c
Author: Jingoo Han <[email protected]> Date: Tue Dec 3 08:30:22 2013 +0900
watchdog: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred.
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
Documentation/devicetree/bindings/watchdog/atmel-wdt.txt +28 -2
@@ -9,11 +9,37 @@ Required properties: Optional properties: - timeout-sec: contains the watchdog timeout in seconds. +- interrupts : Should contain WDT interrupt. +- atmel,max-heartbeat-sec : Should contain the maximum heartbeat value in + seconds. This value should be less or equal to 16. It is used to + compute the WDV field. +- atmel,min-heartbeat-sec : Should contain the minimum heartbeat value in + seconds. This value must be smaller than the max-heartbeat-sec value. + It is used to compute the WDD field. +- atmel,watchdog-type : Should be "hardware" or "software". Hardware watchdog + use the at91 watchdog reset. Software watchdog use the watchdog + interrupt to trigger a software reset. +- atmel,reset-type : Should be "proc" or "all". + "all" : assert peripherals and processor reset signals + "proc" : assert the processor reset signal + This is valid only when using "hardware" watchdog. +- atmel,disable : Should be present if you want to disable the watchdog. +- atmel,idle-halt : Should be present if you want to stop the watchdog when + entering idle state. +- atmel,dbg-halt : Should be present if you want to stop the watchdog when + entering debug state. Example: - watchdog@fffffd40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffd40 0x10>; - timeout-sec = <10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + timeout-sec = <15>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; + atmel,max-heartbeat-sec = <16>; + atmel,min-heartbeat-sec = <0>; + status = "okay"; };
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt +14 -2
@@ -1,12 +1,24 @@ -DaVinci Watchdog Timer (WDT) Controller +Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller Required properties: -- compatible : Should be "ti,davinci-wdt" +- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt" - reg : Should contain WDT registers location and length +Optional properties: +- timeout-sec : Contains the watchdog timeout in seconds +- clocks : the clock feeding the watchdog timer. + Needed if platform uses clocks. + See clock-bindings.txt + +Documentation: +Davinci DM646x - http://www.ti.com/lit/ug/spruer5b/spruer5b.pdf +Keystone - http://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf + Examples: wdt: wdt@2320000 { compatible = "ti,davinci-wdt"; reg = <0x02320000 0x80>; + timeout-sec = <30>; + clocks = <&clkwdtimer0>; };
Documentation/devicetree/bindings/watchdog/gpio-wdt.txt new file +23 -0
@@ -0,0 +1,23 @@ +* GPIO-controlled Watchdog + +Required Properties: +- compatible: Should contain "linux,wdt-gpio". +- gpios: From common gpio binding; gpio connection to WDT reset pin. +- hw_algo: The algorithm used by the driver. Should be one of the + following values: + - toggle: Either a high-to-low or a low-to-high transition clears + the WDT counter. The watchdog timer is disabled when GPIO is + left floating or connected to a three-state buffer. + - level: Low or high level starts counting WDT timeout, + the opposite level disables the WDT. Active level is determined + by the GPIO flags. +- hw_margin_ms: Maximum time to reset watchdog circuit (milliseconds). + +Example: + watchdog: watchdog { + /* ADM706 */ + compatible = "linux,wdt-gpio"; + gpios = <&gpio3 9 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <1600>; + };
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt +20 -1
@@ -5,10 +5,29 @@ after a preset amount of time during which the WDT reset event has not occurred. Required properties: -- compatible : should be "samsung,s3c2410-wdt" +- compatible : should be one among the following + (a) "samsung,s3c2410-wdt" for Exynos4 and previous SoCs + (b) "samsung,exynos5250-wdt" for Exynos5250 + (c) "samsung,exynos5420-wdt" for Exynos5420 + - reg : base physical address of the controller and length of memory mapped region. - interrupts : interrupt number to the cpu. +- samsung,syscon-phandle : reference to syscon node (This property required only + in case of compatible being "samsung,exynos5250-wdt" or "samsung,exynos5420-wdt". + In case of Exynos5250 and 5420 this property points to syscon node holding the PMU + base address) Optional properties: - timeout-sec : contains the watchdog timeout in seconds. + +Example: + +watchdog@101D0000 { + compatible = "samsung,exynos5250-wdt"; + reg = <0x101D0000 0x100>; + interrupts = <0 42 0>; + clocks = <&clock 336>; + clock-names = "watchdog"; + samsung,syscon-phandle = <&pmu_syscon>; +};
arch/arm/boot/dts/at91sam9260.dtsi +5 -0
@@ -648,6 +648,11 @@ watchdog@fffffd40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffd40 0x10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; }; };
arch/arm/boot/dts/at91sam9263.dtsi +5 -0
@@ -552,6 +552,11 @@ watchdog@fffffd40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffd40 0x10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; };
arch/arm/boot/dts/at91sam9g45.dtsi +5 -0
@@ -706,6 +706,11 @@ watchdog@fffffd40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffd40 0x10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; };
arch/arm/boot/dts/at91sam9n12.dtsi +5 -0
@@ -541,6 +541,11 @@ watchdog@fffffe40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffe40 0x10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; };
arch/arm/boot/dts/at91sam9x5.dtsi +5 -0
@@ -754,6 +754,11 @@ watchdog@fffffe40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffe40 0x10>; + interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; };
arch/arm/boot/dts/kizbox.dts +6 -0
@@ -53,6 +53,12 @@ status = "okay"; }; + watchdog@fffffd40 { + timeout-sec = <15>; + atmel,max-heartbeat-sec = <16>; + atmel,min-heartbeat-sec = <0>; + status = "okay"; + }; }; nand0: nand@40000000 {
arch/arm/boot/dts/sama5d3.dtsi +5 -0
@@ -1092,6 +1092,11 @@ watchdog@fffffe40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffe40 0x10>; + interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>; + atmel,watchdog-type = "hardware"; + atmel,reset-type = "all"; + atmel,dbg-halt; + atmel,idle-halt; status = "disabled"; };
arch/arm/configs/bcm_defconfig +3 -0
@@ -126,3 +126,6 @@ CONFIG_CRC7=y CONFIG_XZ_DEC=y CONFIG_AVERAGE=y CONFIG_PINCTRL_CAPRI=y +CONFIG_WATCHDOG=y +CONFIG_BCM_KONA_WDT=y +CONFIG_BCM_KONA_WDT_DEBUG=y
drivers/watchdog/Kconfig +50 -9
114 lines not on this page · raw message
drivers/watchdog/Makefile +2 -0
@@ -57,6 +57,7 @@ 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_BCM_KONA_WDT) += bcm_kona_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
@@ -171,6 +172,7 @@ obj-$(CONFIG_XEN_WDT) += xen_wdt.o # Architecture Independent obj-$(CONFIG_DA9052_WATCHDOG) += da9052_wdt.o obj-$(CONFIG_DA9055_WATCHDOG) += da9055_wdt.o +obj-$(CONFIG_GPIO_WATCHDOG) += gpio_wdt.o obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
drivers/watchdog/alim1535_wdt.c +1 -1
@@ -301,7 +301,7 @@ static int ali_notify_sys(struct notifier_block *this,* want to register another driver on the same PCI id. */ -static DEFINE_PCI_DEVICE_TABLE (ali_pci_tbl)__used = { +static const struct pci_device_id ali_pci_tbl[]__used = { {PCI_VENDOR_ID_AL ,0x1533 ,PCI_ANY_ID ,PCI_ANY_ID ,}, {PCI_VENDOR_ID_AL ,0x1535 ,PCI_ANY_ID ,PCI_ANY_ID ,}, {0 , },
drivers/watchdog/alim7101_wdt.c +1 -1
@@ -414,7 +414,7 @@ err_out:module_init (alim7101_wdt_init);module_exit (alim7101_wdt_unload); -static DEFINE_PCI_DEVICE_TABLE (alim7101_pci_tbl)__used = { +static const struct pci_device_id alim7101_pci_tbl[]__used = { {PCI_DEVICE (PCI_VENDOR_ID_AL ,PCI_DEVICE_ID_AL_M1533 ) }, {PCI_DEVICE (PCI_VENDOR_ID_AL ,PCI_DEVICE_ID_AL_M7101 ) }, { }
drivers/watchdog/at91sam9_wdt.c +236 -84
418 lines not on this page · raw message
drivers/watchdog/bcm_kona_wdt.c new file +368 -0
368 lines not on this page · raw message
drivers/watchdog/davinci_wdt.c +96 -125
300 lines not on this page · raw message
drivers/watchdog/dw_wdt.c +1 -1
@@ -8,7 +8,7 @@* 2 of the License, or (at your option) any later version. * * This file implements a driver for the Synopsys DesignWare watchdog device -* in the many ARM subsystems. The watchdog has 16 different timeout periods +* in the many subsystems. The watchdog has 16 different timeout periods * and these are a function of the input clock frequency. * * The DesignWare watchdog cannot be stopped once it has been started so we
drivers/watchdog/gpio_wdt.c new file +254 -0
254 lines not on this page · raw message
drivers/watchdog/hpwdt.c +9 -4
@@ -39,7 +39,7 @@#endif /* CONFIG_HPWDT_NMI_DECODING */ #include <asm/nmi.h> -#define HPWDT_VERSION "1.3.2" +#define HPWDT_VERSION "1.3.3"#define SECS_TO_TICKS (secs) ((secs) * 1000 / 128)#define TICKS_TO_SECS (ticks) ((ticks) * 128 / 1000)#define HPWDT_MAX_TIMER TICKS_TO_SECS(65535)
@@ -55,7 +55,7 @@ static void __iomem *pci_mem_addr; /* the PCI-memory address */static unsigned long __iomem *hpwdt_timer_reg;static unsigned long __iomem *hpwdt_timer_con; -static DEFINE_PCI_DEVICE_TABLE (hpwdt_devices) = { +static const struct pci_device_id hpwdt_devices[] = { {PCI_DEVICE (PCI_VENDOR_ID_COMPAQ ,0xB203 ) },/* iLO2 */ {PCI_DEVICE (PCI_VENDOR_ID_HP ,0x3306 ) },/* iLO3 */ {0 },/* terminate list */
@@ -501,8 +501,13 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) "but unable to determine source.\n"); } } -panic ("An NMI occurred, please see the Integrated " -"Management Log for details.\n" ); +panic ("An NMI occurred. Depending on your system the reason " +"for the NMI is logged in any one of the following " +"resources:\n" +"1. Integrated Management Log (IML)\n" +"2. OA Syslog\n" +"3. OA Forward Progress Log\n" +"4. iLO Event Log" ); out:return NMI_DONE ;
drivers/watchdog/i6300esb.c +1 -1
@@ -334,7 +334,7 @@ static struct miscdevice esb_miscdev = {/* * Data for PCI driver interface */ -static DEFINE_PCI_DEVICE_TABLE (esb_pci_tbl) = { +static const struct pci_device_id esb_pci_tbl[] = { {PCI_DEVICE (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ESB_9 ), }, {0 , },/* End of list */ };
drivers/watchdog/imx2_wdt.c +4 -0
@@ -2,6 +2,7 @@* Watchdog driver for IMX2 and later processors * * Copyright (C) 2010 Wolfram Sang, Pengutronix e.K. <[email protected]> +* Copyright (C) 2014 Freescale Semiconductor, Inc. * * some parts adapted by similar drivers from Darius Augulis and Vladimir * Zapolskiy, additional improvements by Wim Van Sebroeck.
@@ -40,6 +41,7 @@#define IMX2_WDT_WCR_WT (0xFF << 8)/* -> Watchdog Timeout Field */ #define IMX2_WDT_WCR_WRE (1 << 3)/* -> WDOG Reset Enable */ #define IMX2_WDT_WCR_WDE (1 << 2)/* -> Watchdog Enable */ +#define IMX2_WDT_WCR_WDZST (1 << 0)/* -> Watchdog timer Suspend */ #define IMX2_WDT_WSR 0x02/* Service Register */ #define IMX2_WDT_SEQ1 0x5555/* -> service sequence 1 */
@@ -87,6 +89,8 @@ static inline void imx2_wdt_setup(void) {u16 val =__raw_readw (imx2_wdt.base +IMX2_WDT_WCR ); +/* Suspend timer in low power mode, write once-only */ + val |=IMX2_WDT_WCR_WDZST ;/* Strip the old watchdog Time-Out value */ val &= ~IMX2_WDT_WCR_WT ;/* Generate reset if WDOG times out */
drivers/watchdog/moxart_wdt.c +15 -0
@@ -19,6 +19,8 @@#include <linux/watchdog.h> #include <linux/moduleparam.h> +#include <asm/system_misc.h> +#define REG_COUNT 0x4#define REG_MODE 0x8#define REG_ENABLE 0xC
@@ -29,8 +31,17 @@ struct moxart_wdt_dev {unsigned int clock_frequency; }; +static struct moxart_wdt_dev *moxart_restart_ctx; +static int heartbeat; +static void moxart_wdt_restart (enum reboot_mode reboot_mode,const char *cmd) +{ +writel (1 , moxart_restart_ctx->base +REG_COUNT ); +writel (0x5ab9 , moxart_restart_ctx->base +REG_MODE ); +writel (0x03 , moxart_restart_ctx->base +REG_ENABLE ); +} +static int moxart_wdt_stop (struct watchdog_device *wdt_dev) {struct moxart_wdt_dev *moxart_wdt =watchdog_get_drvdata (wdt_dev);
@@ -125,6 +136,9 @@ static int moxart_wdt_probe(struct platform_device *pdev)if (err)return err; + moxart_restart_ctx = moxart_wdt; + arm_pm_restart = moxart_wdt_restart; +dev_dbg (dev,"Watchdog enabled (heartbeat=%d sec, nowayout=%d)\n" , moxart_wdt->dev.timeout, nowayout);
@@ -135,6 +149,7 @@ static int moxart_wdt_remove(struct platform_device *pdev) {struct moxart_wdt_dev *moxart_wdt =platform_get_drvdata (pdev); + arm_pm_restart =NULL ;moxart_wdt_stop (&moxart_wdt->dev);watchdog_unregister_device (&moxart_wdt->dev);
drivers/watchdog/mpc8xxx_wdt.c +37 -73
182 lines not on this page · raw message
drivers/watchdog/nv_tco.c +1 -1
@@ -289,7 +289,7 @@ static struct miscdevice nv_tco_miscdev = {* register a pci_driver, because someone else might one day * want to register another driver on the same PCI id. */ -static DEFINE_PCI_DEVICE_TABLE (tco_pci_tbl) = { +static const struct pci_device_id tco_pci_tbl[] = { {PCI_VENDOR_ID_NVIDIA ,PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS ,PCI_ANY_ID ,PCI_ANY_ID , }, {PCI_VENDOR_ID_NVIDIA ,PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS ,
drivers/watchdog/pcwd_pci.c +1 -1
@@ -801,7 +801,7 @@ static void pcipcwd_card_exit(struct pci_dev *pdev) cards_found--; } -static DEFINE_PCI_DEVICE_TABLE (pcipcwd_pci_tbl) = { +static const struct pci_device_id pcipcwd_pci_tbl[] = { {PCI_VENDOR_ID_QUICKLOGIC ,PCI_DEVICE_ID_WATCHDOG_PCIPCWD ,PCI_ANY_ID ,PCI_ANY_ID , }, {0 },/* End of list */
drivers/watchdog/s3c2410_wdt.c +185 -18
342 lines not on this page · raw message
drivers/watchdog/sirfsoc_wdt.c +1 -1
@@ -212,7 +212,7 @@ static struct platform_driver sirfsoc_wdt_driver = { .name = "sirfsoc-wdt", .owner = THIS_MODULE, .pm = &sirfsoc_wdt_pm_ops, - .of_match_table = of_match_ptr(sirfsoc_wdt_of_match), + .of_match_table = sirfsoc_wdt_of_match, }, .probe = sirfsoc_wdt_probe, .remove = sirfsoc_wdt_remove,
drivers/watchdog/sp5100_tco.c +1 -1
@@ -303,7 +303,7 @@ static struct miscdevice sp5100_tco_miscdev = {* register a pci_driver, because someone else might * want to register another driver on the same PCI id. */ -static DEFINE_PCI_DEVICE_TABLE (sp5100_tco_pci_tbl) = { +static const struct pci_device_id sp5100_tco_pci_tbl[] = { {PCI_VENDOR_ID_ATI ,PCI_DEVICE_ID_ATI_SBX00_SMBUS ,PCI_ANY_ID ,PCI_ANY_ID , }, {0 , },/* End of list */
drivers/watchdog/via_wdt.c +1 -1
@@ -239,7 +239,7 @@ static void wdt_remove(struct pci_dev *pdev)pci_disable_device (pdev); } -static DEFINE_PCI_DEVICE_TABLE (wdt_pci_table) = { +static const struct pci_device_id wdt_pci_table[] = { {PCI_DEVICE (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_CX700 ) }, {PCI_DEVICE (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VX800 ) }, {PCI_DEVICE (PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_VX855 ) },
drivers/watchdog/w83627hf_wdt.c +206 -28
297 lines not on this page · raw message
drivers/watchdog/watchdog_core.c +2 -2
@@ -78,7 +78,7 @@ int watchdog_init_timeout(struct watchdog_device *wdd,watchdog_check_min_max_timeout (wdd);/* try to get the timeout module parameter first */ -if (!watchdog_timeout_invalid (wdd, timeout_parm)) { +if (!watchdog_timeout_invalid (wdd, timeout_parm) && timeout_parm) { wdd->timeout = timeout_parm;return ret; }
@@ -89,7 +89,7 @@ int watchdog_init_timeout(struct watchdog_device *wdd,if (dev ==NULL || dev->of_node ==NULL )return ret;of_property_read_u32 (dev->of_node,"timeout-sec" , &t); -if (!watchdog_timeout_invalid (wdd, t)) +if (!watchdog_timeout_invalid (wdd, t) && t) wdd->timeout = t;else ret = -EINVAL ;
drivers/watchdog/wdt_pci.c +1 -1
@@ -720,7 +720,7 @@ static void wdtpci_remove_one(struct pci_dev *pdev) } -static DEFINE_PCI_DEVICE_TABLE (wdtpci_pci_tbl) = { +static const struct pci_device_id wdtpci_pci_tbl[] = { { .vendor =PCI_VENDOR_ID_ACCESSIO , .device =PCI_DEVICE_ID_ACCESSIO_WDG_CSM ,