Skip to contentSkip to conversation

watchdog - v3.15-rc1 Patches

GIT PULL Wim Van Sebroeck 1 participant 1 message Mar 31, 2014

Subsystems (16)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git

This patchset contains:
* Various small clean-ups and fixes
* boot logic hanegs for mpc8xxx_wdt
* it87_wdt: Work around non-working CIR interrupts
* iTCO_wdt: Fix the parent device
* Kconfig dependencies
* simplification of code with devm_ioremap_resource() or platform_driver_probe()
* conversion of xilinx watchdog driver to Generic watchdog Framework
* addition of extra functionality and devices for the xilinx watchdog driver
* Addition of Tegra watchdog

This will update the following files:

 Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt |   23 
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt     |    5 
 Documentation/watchdog/watchdog-parameters.txt               |    7 
 drivers/watchdog/Kconfig                                     |   38 -
 drivers/watchdog/Makefile                                    |    1 
 drivers/watchdog/acquirewdt.c                                |   21 
 drivers/watchdog/advantechwdt.c                              |   21 
 drivers/watchdog/ar7_wdt.c                                   |    1 
 drivers/watchdog/at32ap700x_wdt.c                            |    4 
 drivers/watchdog/ath79_wdt.c                                 |    1 
 drivers/watchdog/bcm2835_wdt.c                               |    4 
 drivers/watchdog/bcm47xx_wdt.c                               |    1 
 drivers/watchdog/bcm63xx_wdt.c                               |    2 
 drivers/watchdog/cpu5wdt.c                                   |    1 
 drivers/watchdog/cpwd.c                                      |    1 
 drivers/watchdog/da9052_wdt.c                                |    1 
 drivers/watchdog/da9055_wdt.c                                |    4 
 drivers/watchdog/davinci_wdt.c                               |    1 
 drivers/watchdog/ep93xx_wdt.c                                |   19 
 drivers/watchdog/geodewdt.c                                  |   17 
 drivers/watchdog/hpwdt.c                                     |    1 
 drivers/watchdog/i6300esb.c                                  |    1 
 drivers/watchdog/iTCO_wdt.c                                  |    8 
 drivers/watchdog/ib700wdt.c                                  |   21 
 drivers/watchdog/ibmasr.c                                    |    2 
 drivers/watchdog/indydog.c                                   |   13 
 drivers/watchdog/intel_scu_watchdog.c                        |    4 
 drivers/watchdog/it87_wdt.c                                  |   41 -
 drivers/watchdog/jz4740_wdt.c                                |    1 
 drivers/watchdog/max63xx_wdt.c                               |    1 
 drivers/watchdog/mpc8xxx_wdt.c                               |    1 
 drivers/watchdog/mtx-1_wdt.c                                 |    1 
 drivers/watchdog/nuc900_wdt.c                                |    1 
 drivers/watchdog/of_xilinx_wdt.c                             |  390 +++--------
 drivers/watchdog/omap_wdt.c                                  |   23 
 drivers/watchdog/orion_wdt.c                                 |    1 
 drivers/watchdog/pc87413_wdt.c                               |    7 
 drivers/watchdog/pcwd_usb.c                                  |    4 
 drivers/watchdog/pnx4008_wdt.c                               |    1 
 drivers/watchdog/rdc321x_wdt.c                               |    1 
 drivers/watchdog/retu_wdt.c                                  |    1 
 drivers/watchdog/riowd.c                                     |    1 
 drivers/watchdog/s3c2410_wdt.c                               |    9 
 drivers/watchdog/sc520_wdt.c                                 |    3 
 drivers/watchdog/shwdt.c                                     |    2 
 drivers/watchdog/softdog.c                                   |    2 
 drivers/watchdog/sp805_wdt.c                                 |   19 
 drivers/watchdog/stmp3xxx_rtc_wdt.c                          |    1 
 drivers/watchdog/sunxi_wdt.c                                 |    2 
 drivers/watchdog/tegra_wdt.c                                 |  302 ++++++++
 drivers/watchdog/ts72xx_wdt.c                                |    6 
 drivers/watchdog/w83697hf_wdt.c                              |    4 
 drivers/watchdog/wdt285.c                                    |    3 
 drivers/watchdog/wdt_pci.c                                   |    1 
 drivers/watchdog/wm831x_wdt.c                                |    1 
 55 files changed, 584 insertions(+), 469 deletions(-)

with these Changes:

commit 6d956e422bf1848e430e0ec3610096215217cb02

Author: Jean Delvare <[email protected]>
Date:   Fri Mar 14 20:25:29 2014 +0100

watchdog: Fix Elan SC520 dependencies

Anyone using a system based on an AMD Elan SC520 processor would be building a dedicated kernel for it, so we can make the sc520_wdt driver depend on MELAN. SC520_CPUFREQ already depends on MELAN so it makes things more consistent. It also makes kernel configuration for every other x86 user easier.

commit 996735ffd4560ee12d8dd98ad9d27379ee943890

Author: Jean Delvare <[email protected]>
Date:   Fri Mar 14 13:18:47 2014 +0100

watchdog: ib700wdt: Use platform_driver_probe

Using platform_driver_probe instead of platform_driver_register has two benefits:
* The driver will fail to load if device probing fails.
* The probe function can be marked __init.

commit 78411be4c7136054dab4635d2dbd848c3c9f7eae

Author: Jean Delvare <[email protected]>
Date:   Fri Mar 14 13:16:47 2014 +0100

watchdog: geodewdt: Use platform_driver_probe

Using platform_driver_probe instead of platform_driver_register has two benefits:
* The driver will fail to load if device probing fails.
* The probe function can be marked __init.

commit acaaaf62c94a786f68b35cd06979fbd2fcedc89b

Author: Jean Delvare <[email protected]>
Date:   Fri Mar 14 13:07:40 2014 +0100

watchdog: advantechwdt: Use platform_driver_probe

Using platform_driver_probe instead of platform_driver_register has two benefits:
* The driver will fail to load if device probing fails.
* The probe function can be marked __init.

commit b0e0b4b5984ab1d59bc8569d28e499820b8ea8d8

Author: Jean Delvare <[email protected]>
Date:   Fri Mar 14 13:04:37 2014 +0100

watchdog: acquirewdt: Use platform_driver_probe

Using platform_driver_probe instead of platform_driver_register has two benefits:
* The driver will fail to load if device probing fails.
* The probe function can be marked __init.

commit c90789baa8cec363093c5ec292c989b6f22d8f32

Author: Jean Delvare <[email protected]>
Date:   Mon Mar 10 21:28:17 2014 +0100

watchdog: iTCO_wdt: Fix the parent device

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich (the PCI device.) Setting the parent right makes it much easier for the user to figure out which driver/module is handling the watchdog device node.

commit 0bcd0b6a47431d9895dc2dd6a8c4185008849131

Author: Marc van der Wal <[email protected]>
Date:   Thu Mar 6 10:36:59 2014 +0100

watchdog: it87_wdt: Work around non-working CIR interrupts

On some hardware platforms, the it87_wdt watchdog resets the machine despite the watchdog daemon running and writing to /dev/watchdog.

This is due to Consumer IR buffer underrun interrupts being used as triggers to reset the timer. On some buggy hardware implementations such as the iEi AFL-12A-N270 single-board computer, this method does not work.

However, resetting the timer by writing its original timeout value in its configuration register over and over again suppresses the unwanted reboots.

Add a module option (nocir), 0 by default in order not to break existing setups. Setting it to 1 enables the workaround.

Fixes bug #42801 <https://bugzilla.kernel.org/show_bug.cgi?id=42801>.
Tested primarily on Linux 3.5.7, applies cleanly on Linux 3.13.5.

commit 5e82ec94ac5d2d941414861654032543a75cf823

Author: Markus Mayer <[email protected]>
Date:   Wed Mar 5 18:57:41 2014 +0800

watchdog: bcm281xx: Fix Kconfig dependency

Use more the applicable ARCH_BCM_MOBILE option instead of ARCH_BCM as dependency for bcm_kona_wdt.c.

commit 01b6af91593629224490b76c4bf4b0eb8cfbfb31

Author: Sachin Kamat <[email protected]>
Date:   Tue Mar 4 15:04:35 2014 +0530

watchdog: s3c2410_wdt: Check return value of clk_prepare_enable

clk_prepare_enable can fail. Check its return value.

commit a94dd879e2939798294c56468add3d6a8ef04137

Author: Sachin Kamat <[email protected]>
Date:   Tue Mar 4 15:04:34 2014 +0530

watchdog: s3c2410_wdt: Remove unneeded initialization

Initializing clk to NULL as a reset/error condition does not help as NULL is not an invalid condition w.r.t clk. Remove this initialization altogether as there is no state retention.

commit b0f1d8bec712b4267995764b34ced2c148ecfacb

Author: Maxime Ripard <[email protected]>
Date:   Fri Feb 7 22:29:24 2014 +0100

watchdog: sunxi: Change compatibles

The Allwinner A10 and A31 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Change the compatibles to match the other pattern in the watchdog controller driver for consistency.

commit 0187cca30c5d85e39b2da28806acef7db8a88ae2

Author: Sebastian Hesselbarth <[email protected]>
Date:   Sat Mar 1 09:33:18 2014 +0100

watchdog: orion: prepare new Dove DT Kconfig variable

DT-enabled Dove will move over from ARCH_DOVE in mach-dove to MACH_DOVE in mach-mvebu. As non-DT ARCH_DOVE will stay to rot for a while, add a new DT-only MACH_DOVE Kconfig.

commit 5f5e19093b2fa592720810154f15ffe51aa9277f

Author: Jingoo Han <[email protected]>
Date:   Thu Feb 27 14:41:42 2014 +0900

watchdog: fix checkpatch warnings and error

Fix the following checkpatch warnings and error:
WARNING: quoted string split across lines
WARNING: braces {} are not necessary for single statement blocks
WARNING: __initdata should be placed after ibmasr_id_table[]
WARNING: please, no space before tabs
ERROR: do not initialise statics to 0 or NULL

commit c33a15974c1a326b0034cc2a2e73fac92ae8d001

Author: Andrew Chew <[email protected]>
Date:   Fri Feb 14 12:03:05 2014 -0800

watchdog: Add tegra watchdog

Add a driver for the hardware watchdogs in NVIDIA Tegra SoCs (Tegra30 and later). This driver will configure one watchdog timer that will reset the system in the case of a watchdog timeout.

This driver binds to the nvidia,tegra30-timer device node and gets its register base from there.

commit 8d6a140b5f0def8c34d803474780b7b11fe0fab4

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:25 2014 +0100

watchdog: xilinx: Remove no_timeout variable

Remove no_timeout variable and check variables directly.

commit c9dcf9f2ea3d64602fe6230daba80f2ed811535b

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:24 2014 +0100

watchdog: xilinx: Enable this driver for Zynq

Enable this driver for Zynq.
Move it to architecture independent Kconfig part.

commit a8b84b01e4af2baad3cef46bc86dcb2718c79e72

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:23 2014 +0100

watchdog: xilinx: Add missing binding

Document current driver binding.

commit 75b3c5a827de11620f9bf7cbd6c3e4208bd3ddf5

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:22 2014 +0100

watchdog: xilinx: Use correct comment indentation

No functional changes.

commit 2e79a368473d55db3237120dea0f561660dac5bd

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:21 2014 +0100

watchdog: xilinx: Use of_property_read_u32

Use of_property_read_u32 functions to clean probe function.

commit 4c7fbbc4a57a35ed109f58f52eff1a04660789e9

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:20 2014 +0100

watchdog: xilinx: Fix all printk messages

Use dev_ functions for printk messages.

commit 9066317178ca87b9d958f801c8fcf784ec31c6c3

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:41:19 2014 +0100

watchdog: xilinx: Allocate private structure per device

Only one watchdog could be used by this driver. Create driver private data structure and move there all variables for one instance.

commit ffb8eee4f140bbfc333381168d6fe1a7e7dc7af7

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:34:35 2014 +0100

watchdog: xilinx: Move no_timeout to probe function

no_timeout should be local variable because it is used only in probe function.

commit f06cdfd184d845e1f01df7f636c0e3b5c5cc8d18

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:34:34 2014 +0100

watchdog: xilinx: Simplify probe and remove functions

Use devm_ helper function to simplify probe and error path. Move ioremap to the beginning of probe function.

commit 5cf4e69d39f6a31a5305d01690c1607356b1483b

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:34:33 2014 +0100

watchdog: xilinx: Move control_status_reg to functions

control_status_reg is temp variables and should be used locally by specific function.

commit d14fd9645501444f06034339118de56686e25dfb

Author: Michal Simek <[email protected]>
Date:   Wed Feb 12 14:34:32 2014 +0100

watchdog: xilinx: Convert driver to the watchdog framework

- Remove uneeded headers, fops functions
- Use xilinx_wdt prefix in start/stop/keepalive functions and in new structures

commit 70605d9bab216534a593f3ec8218ab8c015cb452

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:23:25 2014 +0400

watchdog: wdt285: Fix variable type

Variable "new_margin" is checked in the function watchdog_ioctl() to be non-negative, so change its type to "int".

commit 1cf8a3487d385b3221d07ab6a7a003761e8806c1

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:23:07 2014 +0400

watchdog: shwdt: Remove unused variable

Variable "wdt" is not used anywhere in the function sh_wdt_remove(). This patch removes this variable.

commit a9ba8376e9e6f7d3d6dd5c2c6816e9a9358d38e8

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:22:49 2014 +0400

watchdog: sc520_wdt: Remove unused variable

Variable "dummy" is not used anywhere in the function wdt_config(). This patch removes this variable.

commit c303ca87653566db01fe5e49ac72a8b3dc1fb722

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:22:18 2014 +0400

watchdog: intel_scu_watchdog: Remove unused variable

Variable "hw_pre_value" is not used anywhere in the function intel_scu_set_heartbeat().
This patch removes this variable.

commit 0c29c2e8506ab9cfebd4836e758aa55dd5cf66fe

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:21:51 2014 +0400

watchdog: indydog: Simplify indydog_{start,stop}

This patch simplify functions indydog_start() and indydog_stop() a bit and removes excess intermediate variable.

commit 7bce7c011e8f5d6e4e3da2309a614b6efb10466b

Author: Alexander Shiyan <[email protected]>
Date:   Sat Feb 15 13:21:03 2014 +0400

watchdog: bcm63xx_wdt: Remove unused field from bcm63xx_wdt_device

Field "default_ticks" is not used anywhere in the driver code. This patch removes this field.

commit 9d11e4f8c3353088ace2f80bec85bb0e2f316382

Author: Jingoo Han <[email protected]>
Date:   Tue Feb 11 21:45:56 2014 +0900

watchdog: sp805_wdt: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler.

commit 6e272061391946fe28cadd5f9fbab1bab82b3748

Author: Jingoo Han <[email protected]>
Date:   Tue Feb 11 21:44:12 2014 +0900

watchdog: omap_wdt: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler, and remove 'struct resource *mem' from 'struct omap_wdt_dev' and omap_wdt_probe(), resplectively. because the 'mem' variables are not used anymore. Also the redundant return value check of platform_get_resource() is removed, because the value is checked by devm_ioremap_resource().

commit 4f6120b014c6a981a57a8951e01acfead1a57069

Author: Jingoo Han <[email protected]>
Date:   Tue Feb 11 21:41:54 2014 +0900

watchdog: ep93xx_wdt: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource().

commit a17fb5cbee5dffcb93aeb4b71e2ef9e0eeec0bc2

Author: Jingoo Han <[email protected]>
Date:   Tue Feb 11 15:59:38 2014 +0900

watchdog: ts72xx_wdt: make 'ts72xx_wdt_pdev' static

Make 'ts72xx_wdt_pdev' static, because it is used only in this file. It also fixes the following sparse warning.

warning: symbol 'ts72xx_wdt_pdev' was not declared. Should it be static?

commit 8deea830644c0a4bdd90dfda7249d0f40f0667fa

Author: Jingoo Han <[email protected]>
Date:   Tue Feb 11 15:46:43 2014 +0900

watchdog: Remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. For example, k.alloc and v.alloc failures use dump_stack().

commit 8126334b20d79272a15b5c45053cb76b1e7320be

Author: Paul Gortmaker <[email protected]>
Date:   Tue Jan 21 16:22:43 2014 -0500

watchdog: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next.

commit 4af897fa9992e5648d01fcff19d2c6d86a5143c9

Author: Christophe Leroy <[email protected]>
Date:   Sat Nov 30 16:45:40 2013 +0100

watchdog: mpc8xxx_wdt: MPC8xx is HW enabled

MPC8xx watchdog is enabled at startup by HW. If the bootloader disables it, it cannot be reenabled.

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================

Documentation/devicetree/bindings/watchdog/of-xilinx-wdt.txt new file +23 -0
new file mode 100644
index 0000000..6d63782
@@ -0,0 +1,23 @@
+Xilinx AXI/PLB soft-core watchdog Device Tree Bindings
+---------------------------------------------------------
+
+Required properties:
+- compatible		: Should be "xlnx,xps-timebase-wdt-1.00.a" or
+			  "xlnx,xps-timebase-wdt-1.01.a".
+- reg			: Physical base address and size
+
+Optional properties:
+- clock-frequency	: Frequency of clock in Hz
+- xlnx,wdt-enable-once	: 0 - Watchdog can be restarted
+			  1 - Watchdog can be enabled just once
+- xlnx,wdt-interval	: Watchdog timeout interval in 2^<val> clock cycles,
+			  <val> is integer from 8 to 31.
+
+Example:
+axi-timebase-wdt@40100000 {
+	clock-frequency = <50000000>;
+	compatible = "xlnx,xps-timebase-wdt-1.00.a";
+	reg = <0x40100000 0x10000>;
+	xlnx,wdt-enable-once = <0x0>;
+	xlnx,wdt-interval = <0x1b>;
+} ;
Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt +3 -3
index e39cb26..b8f75c5 100644
@@ -2,13 +2,13 @@ Allwinner SoCs Watchdog timer
 
 Required properties:
 
-- compatible : should be "allwinner,<soc-family>-wdt", the currently supported
-  SoC families being sun4i and sun6i
+- compatible : should be either "allwinner,sun4i-a10-wdt" or
+               "allwinner,sun6i-a31-wdt"
 - reg : Specifies base physical address and size of the registers.
 
 Example:
 
 wdt: watchdog@01c20c90 {
-	compatible = "allwinner,sun4i-wdt";
+	compatible = "allwinner,sun4i-a10-wdt";
 	reg = <0x01c20c90 0x10>;
 };
Documentation/watchdog/watchdog-parameters.txt +7 -0
index f9492fe..692791c 100644
@@ -150,6 +150,8 @@ nowayout: Disable watchdog shutdown on close
 -------------------------------------------------
 it87_wdt:
 nogameport: Forbid the activation of game port, default=0
+nocir: Forbid the use of CIR (workaround for some buggy setups); set to 1 if
+system resets despite watchdog daemon running, default=0
 exclusive: Watchdog exclusive device open, default=1
 timeout: Watchdog timeout in seconds, default=60
 testmode: Watchdog test mode (1 = no reboot), default=0
@@ -325,6 +327,11 @@ soft_noboot: Softdog action, set to 1 to ignore reboots, 0 to reboot
 stmp3xxx_wdt:
 heartbeat: Watchdog heartbeat period in seconds from 1 to 4194304, default 19
 -------------------------------------------------
+tegra_wdt:
+heartbeat: Watchdog heartbeats in seconds. (default = 120)
+nowayout: Watchdog cannot be stopped once started
+	(default=kernel config parameter)
+-------------------------------------------------
 ts72xx_wdt:
 timeout: Watchdog timeout in seconds. (1 <= timeout <= 8, default=8)
 nowayout: Disable watchdog shutdown on close
drivers/watchdog/Kconfig +23 -15
index 79d2589..0c6048d 100644
@@ -111,6 +111,15 @@ config WM8350_WATCHDOG
 	  Support for the watchdog in the WM8350 AudioPlus PMIC.  When
 	  the watchdog triggers the system will be reset.
 
+config XILINX_WATCHDOG
+	tristate "Xilinx Watchdog timer"
+	select WATCHDOG_CORE
+	help
+	  Watchdog driver for the xps_timebase_wdt ip core.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called of_xilinx_wdt.
+
 # ALPHA Architecture
 
 # ARM Architecture
@@ -292,7 +301,7 @@ config DAVINCI_WATCHDOG
 
 config ORION_WATCHDOG
 	tristate "Orion watchdog"
-	depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE
+	depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE || MACH_DOVE
 	select WATCHDOG_CORE
 	help
 	  Say Y here if to include support for the watchdog timer
@@ -421,6 +430,17 @@ config SIRFSOC_WATCHDOG
 	  Support for CSR SiRFprimaII and SiRFatlasVI watchdog. When
 	  the watchdog triggers the system will be reset.
 
+config TEGRA_WATCHDOG
+	tristate "Tegra watchdog"
+	depends on ARCH_TEGRA || COMPILE_TEST
+	select WATCHDOG_CORE
+	help
+	  Say Y here to include support for the watchdog timer
+	  embedded in NVIDIA Tegra SoCs.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called tegra_wdt.
+
 # AVR32 Architecture
 
 config AT32AP700X_WDT
@@ -533,7 +553,7 @@ config GEODE_WDT
 
 config SC520_WDT
 	tristate "AMD Elan SC520 processor Watchdog"
-	depends on X86
+	depends on MELAN
 	help
 	  This is the driver for the hardware watchdog built in to the
 	  AMD "Elan" SC520 microcomputer commonly used in embedded systems.
@@ -1023,18 +1043,6 @@ config M54xx_WATCHDOG
 
 # MicroBlaze Architecture
 
-config XILINX_WATCHDOG
-	tristate "Xilinx Watchdog timer"
-	depends on MICROBLAZE
-	---help---
-	  Watchdog driver for the xps_timebase_wdt ip core.
-
-	  IMPORTANT: The xps_timebase_wdt parent must have the property
-	  "clock-frequency" at device tree.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called of_xilinx_wdt.
-
 # MIPS Architecture
 
 config ATH79_WDT
@@ -1160,7 +1168,7 @@ config BCM2835_WDT
 
 config BCM_KONA_WDT
 	tristate "BCM Kona Watchdog"
-	depends on ARCH_BCM
+	depends on ARCH_BCM_MOBILE
 	select WATCHDOG_CORE
 	help
 	  Support for the watchdog timer on the following Broadcom BCM281xx
drivers/watchdog/Makefile +1 -0
index 985a66c..1b5f3d5 100644
@@ -58,6 +58,7 @@ 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
+obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o
 
 # AVR32 Architecture
 obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/acquirewdt.c +9 -12
index 5cf1621..5614416 100644
@@ -239,7 +239,7 @@ static struct miscdevice acq_miscdev = {
  *	Init & exit routines
  */
 
-static int acq_probe(struct platform_device *dev)
+static int __init acq_probe(struct platform_device *dev)
 {
 	int ret;
 
@@ -291,7 +291,6 @@ static void acq_shutdown(struct platform_device *dev)
 }
 
 static struct platform_driver acquirewdt_driver = {
-	.probe		= acq_probe,
 	.remove		= acq_remove,
 	.shutdown	= acq_shutdown,
 	.driver		= {
@@ -306,20 +305,18 @@ static int __init acq_init(void)
 
 	pr_info("WDT driver for Acquire single board computer initialising\n");
 
-	err = platform_driver_register(&acquirewdt_driver);
-	if (err)
-		return err;
-
 	acq_platform_device = platform_device_register_simple(DRV_NAME,
 								-1, NULL, 0);
-	if (IS_ERR(acq_platform_device)) {
-		err = PTR_ERR(acq_platform_device);
-		goto unreg_platform_driver;
-	}
+	if (IS_ERR(acq_platform_device))
+		return PTR_ERR(acq_platform_device);
+
+	err = platform_driver_probe(&acquirewdt_driver, acq_probe);
+	if (err)
+		goto unreg_platform_device;
 	return 0;
 
-unreg_platform_driver:
-	platform_driver_unregister(&acquirewdt_driver);
+unreg_platform_device:
+	platform_device_unregister(acq_platform_device);
 	return err;
 }
 
drivers/watchdog/advantechwdt.c +9 -12
index a8961ad..7796db7 100644
@@ -238,7 +238,7 @@ static struct miscdevice advwdt_miscdev = {
  *	Init & exit routines
  */
 
-static int advwdt_probe(struct platform_device *dev)
+static int __init advwdt_probe(struct platform_device *dev)
 {
 	int ret;
 
@@ -299,7 +299,6 @@ static void advwdt_shutdown(struct platform_device *dev)
 }
 
 static struct platform_driver advwdt_driver = {
-	.probe		= advwdt_probe,
 	.remove		= advwdt_remove,
 	.shutdown	= advwdt_shutdown,
 	.driver		= {
@@ -314,21 +313,19 @@ static int __init advwdt_init(void)
 
 	pr_info("WDT driver for Advantech single board computer initialising\n");
 
-	err = platform_driver_register(&advwdt_driver);
-	if (err)
-		return err;
-
 	advwdt_platform_device = platform_device_register_simple(DRV_NAME,
 								-1, NULL, 0);
-	if (IS_ERR(advwdt_platform_device)) {
-		err = PTR_ERR(advwdt_platform_device);
-		goto unreg_platform_driver;
-	}
+	if (IS_ERR(advwdt_platform_device))
+		return PTR_ERR(advwdt_platform_device);
+
+	err = platform_driver_probe(&advwdt_driver, advwdt_probe);
+	if (err)
+		goto unreg_platform_device;
 
 	return 0;
 
-unreg_platform_driver:
-	platform_driver_unregister(&advwdt_driver);
+unreg_platform_device:
+	platform_device_unregister(advwdt_platform_device);
 	return err;
 }
 
drivers/watchdog/ar7_wdt.c +0 -1
index 3a99657..ae6c287 100644
@@ -28,7 +28,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/miscdevice.h>
 #include <linux/platform_device.h>
 #include <linux/watchdog.h>
drivers/watchdog/at32ap700x_wdt.c +1 -3
index afe7d17..25b5c67 100644
@@ -323,10 +323,8 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
 
 	wdt = devm_kzalloc(&pdev->dev, sizeof(struct wdt_at32ap700x),
 			GFP_KERNEL);
-	if (!wdt) {
-		dev_dbg(&pdev->dev, "no memory for wdt structure\n");
+	if (!wdt)
 		return -ENOMEM;
-	}
 
 	wdt->regs = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
 	if (!wdt->regs) {
drivers/watchdog/ath79_wdt.c +0 -1
index 9fa1f69..399c3fd 100644
@@ -22,7 +22,6 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
drivers/watchdog/bcm2835_wdt.c +1 -3
index cafa973..8df450c 100644
@@ -114,10 +114,8 @@ static int bcm2835_wdt_probe(struct platform_device *pdev)
 	int err;
 
 	wdt = devm_kzalloc(dev, sizeof(struct bcm2835_wdt), GFP_KERNEL);
-	if (!wdt) {
-		dev_err(dev, "Failed to allocate memory for watchdog device");
+	if (!wdt)
 		return -ENOMEM;
-	}
 	platform_set_drvdata(pdev, wdt);
 
 	spin_lock_init(&wdt->lock);
drivers/watchdog/bcm47xx_wdt.c +0 -1
index b4021a2..b61fcc5 100644
@@ -16,7 +16,6 @@
 #include <linux/bcm47xx_wdt.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
drivers/watchdog/bcm63xx_wdt.c +0 -2
index 4eb188b..5a8e879 100644
@@ -15,7 +15,6 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
@@ -45,7 +44,6 @@
 static struct {
 	void __iomem *regs;
 	struct timer_list timer;
-	int default_ticks;
 	unsigned long inuse;
 	atomic_t ticks;
 } bcm63xx_wdt_device;
drivers/watchdog/cpu5wdt.c +0 -1
index f7ae49e..6d03e8e 100644
@@ -27,7 +27,6 @@
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/timer.h>
 #include <linux/completion.h>
drivers/watchdog/cpwd.c +0 -1
index 213225e..e55ed70 100644
@@ -21,7 +21,6 @@
 #include <linux/fs.h>
 #include <linux/errno.h>
 #include <linux/major.h>
-#include <linux/init.h>
 #include <linux/miscdevice.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
drivers/watchdog/da9052_wdt.c +0 -1
index f09c54e..2e95896 100644
@@ -185,7 +185,6 @@ static int da9052_wdt_probe(struct platform_device *pdev)
 	driver_data = devm_kzalloc(&pdev->dev, sizeof(*driver_data),
 				   GFP_KERNEL);
 	if (!driver_data) {
-		dev_err(da9052->dev, "Unable to alloacate watchdog device\n");
 		ret = -ENOMEM;
 		goto err;
 	}
drivers/watchdog/da9055_wdt.c +1 -3
index 575f37a..495089d 100644
@@ -151,10 +151,8 @@ static int da9055_wdt_probe(struct platform_device *pdev)
 
 	driver_data = devm_kzalloc(&pdev->dev, sizeof(*driver_data),
 				   GFP_KERNEL);
-	if (!driver_data) {
-		dev_err(da9055->dev, "Failed to allocate watchdog device\n");
+	if (!driver_data)
 		return -ENOMEM;
-	}
 
 	driver_data->da9055 = da9055;
 
drivers/watchdog/davinci_wdt.c +0 -1
index b1bae03..d09ad22 100644
@@ -16,7 +16,6 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/device.h>
drivers/watchdog/ep93xx_wdt.c +6 -13
index d1d07f2..5f54e1e 100644
@@ -118,16 +118,9 @@ static int ep93xx_wdt_probe(struct platform_device *pdev)
 	int err;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENXIO;
-
-	if (!devm_request_mem_region(&pdev->dev, res->start,
-				     resource_size(res), pdev->name))
-		return -EBUSY;
-
-	mmio_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
-	if (!mmio_base)
-		return -ENXIO;
+	mmio_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(mmio_base))
+		return PTR_ERR(mmio_base);
 
 	if (timeout < 1 || timeout > 3600) {
 		timeout = WDT_TIMEOUT;
@@ -172,9 +165,9 @@ static struct platform_driver ep93xx_wdt_driver = {
 
 module_platform_driver(ep93xx_wdt_driver);
 
-MODULE_AUTHOR("Ray Lehtiniemi <[email protected]>,"
-		"Alessandro Zummo <[email protected]>,"
-		"H Hartley Sweeten <[email protected]>");
+MODULE_AUTHOR("Ray Lehtiniemi <[email protected]>");
+MODULE_AUTHOR("Alessandro Zummo <[email protected]>");
+MODULE_AUTHOR("H Hartley Sweeten <[email protected]>");
 MODULE_DESCRIPTION("EP93xx Watchdog");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(WDT_VERSION);
drivers/watchdog/geodewdt.c +7 -10
index 4a6ae84..4c43e3f 100644
@@ -215,7 +215,7 @@ static struct miscdevice geodewdt_miscdev = {
 	.fops = &geodewdt_fops,
 };
 
-static int geodewdt_probe(struct platform_device *dev)
+static int __init geodewdt_probe(struct platform_device *dev)
 {
 	int ret;
 
@@ -255,7 +255,6 @@ static void geodewdt_shutdown(struct platform_device *dev)
 }
 
 static struct platform_driver geodewdt_driver = {
-	.probe		= geodewdt_probe,
 	.remove		= geodewdt_remove,
 	.shutdown	= geodewdt_shutdown,
 	.driver		= {
@@ -268,20 +267,18 @@ static int __init geodewdt_init(void)
 {
 	int ret;
 
-	ret = platform_driver_register(&geodewdt_driver);
-	if (ret)
-		return ret;
-
 	geodewdt_platform_device = platform_device_register_simple(DRV_NAME,
 								-1, NULL, 0);
-	if (IS_ERR(geodewdt_platform_device)) {
-		ret = PTR_ERR(geodewdt_platform_device);
+	if (IS_ERR(geodewdt_platform_device))
+		return PTR_ERR(geodewdt_platform_device);
+
+	ret = platform_driver_probe(&geodewdt_driver, geodewdt_probe);
+	if (ret)
 		goto err;
-	}
 
 	return 0;
 err:
-	platform_driver_unregister(&geodewdt_driver);
+	platform_device_unregister(geodewdt_platform_device);
 	return ret;
 }
 
drivers/watchdog/hpwdt.c +0 -1
index 2b75e8b..75d2243 100644
@@ -17,7 +17,6 @@
 
 #include <linux/device.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/bitops.h>
 #include <linux/kernel.h>
drivers/watchdog/i6300esb.c +0 -1
index 25a2bfd..d7befd5 100644
@@ -36,7 +36,6 @@
 #include <linux/mm.h>
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/uaccess.h>
drivers/watchdog/iTCO_wdt.c +4 -4
index 04f8af6..0e6c033 100644
@@ -347,15 +347,15 @@ static const struct watchdog_info ident = {
 static const struct watchdog_ops iTCO_wdt_ops = {
 	.owner =		THIS_MODULE,
 	.start =		iTCO_wdt_start,
-	.stop = 		iTCO_wdt_stop,
-	.ping = 		iTCO_wdt_ping,
+	.stop =			iTCO_wdt_stop,
+	.ping =			iTCO_wdt_ping,
 	.set_timeout =		iTCO_wdt_set_timeout,
 	.get_timeleft =		iTCO_wdt_get_timeleft,
 };
 
 static struct watchdog_device iTCO_wdt_watchdog_dev = {
 	.info =		&ident,
-	.ops = 		&iTCO_wdt_ops,
+	.ops =		&iTCO_wdt_ops,
 };
 
 /*
@@ -485,7 +485,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
 	iTCO_wdt_watchdog_dev.bootstatus = 0;
 	iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
 	watchdog_set_nowayout(&iTCO_wdt_watchdog_dev, nowayout);
-	iTCO_wdt_watchdog_dev.parent = dev->dev.parent;
+	iTCO_wdt_watchdog_dev.parent = &dev->dev;
 
 	/* Make sure the watchdog is not running */
 	iTCO_wdt_stop(&iTCO_wdt_watchdog_dev);
drivers/watchdog/ib700wdt.c +9 -12
index 7ae3669..4247c49 100644
@@ -277,7 +277,7 @@ static struct miscdevice ibwdt_miscdev = {
  *	Init & exit routines
  */
 
-static int ibwdt_probe(struct platform_device *dev)
+static int __init ibwdt_probe(struct platform_device *dev)
 {
 	int res;
 
@@ -336,7 +336,6 @@ static void ibwdt_shutdown(struct platform_device *dev)
 }
 
 static struct platform_driver ibwdt_driver = {
-	.probe		= ibwdt_probe,
 	.remove		= ibwdt_remove,
 	.shutdown	= ibwdt_shutdown,
 	.driver		= {
@@ -351,21 +350,19 @@ static int __init ibwdt_init(void)
 
 	pr_info("WDT driver for IB700 single board computer initialising\n");
 
-	err = platform_driver_register(&ibwdt_driver);
-	if (err)
-		return err;
-
 	ibwdt_platform_device = platform_device_register_simple(DRV_NAME,
 								-1, NULL, 0);
-	if (IS_ERR(ibwdt_platform_device)) {
-		err = PTR_ERR(ibwdt_platform_device);
-		goto unreg_platform_driver;
-	}
+	if (IS_ERR(ibwdt_platform_device))
+		return PTR_ERR(ibwdt_platform_device);
+
+	err = platform_driver_probe(&ibwdt_driver, ibwdt_probe);
+	if (err)
+		goto unreg_platform_device;
 
 	return 0;
 
-unreg_platform_driver:
-	platform_driver_unregister(&ibwdt_driver);
+unreg_platform_device:
+	platform_device_unregister(ibwdt_platform_device);
 	return err;
 }
 
drivers/watchdog/ibmasr.c +1 -1
index db0a344..366b047 100644
@@ -360,7 +360,7 @@ struct ibmasr_id {
 	int type;
 };
 
-static struct ibmasr_id __initdata ibmasr_id_table[] = {
+static struct ibmasr_id ibmasr_id_table[] __initdata = {
 	{ "IBM Automatic Server Restart - eserver xSeries 220", ASMTYPE_TOPAZ },
 	{ "IBM Automatic Server Restart - Machine Type 8673", ASMTYPE_PEARL },
 	{ "IBM Automatic Server Restart - Machine Type 8480", ASMTYPE_JASPER },
drivers/watchdog/indydog.c +2 -11
index 1b5c25a..5d20cdd 100644
@@ -41,24 +41,15 @@ MODULE_PARM_DESC(nowayout,
 
 static void indydog_start(void)
 {
-	u32 mc_ctrl0;
-
 	spin_lock(&indydog_lock);
-	mc_ctrl0 = sgimc->cpuctrl0;
-	mc_ctrl0 = sgimc->cpuctrl0 | SGIMC_CCTRL0_WDOG;
-	sgimc->cpuctrl0 = mc_ctrl0;
+	sgimc->cpuctrl0 |= SGIMC_CCTRL0_WDOG;
 	spin_unlock(&indydog_lock);
 }
 
 static void indydog_stop(void)
 {
-	u32 mc_ctrl0;
-
 	spin_lock(&indydog_lock);
-
-	mc_ctrl0 = sgimc->cpuctrl0;
-	mc_ctrl0 &= ~SGIMC_CCTRL0_WDOG;
-	sgimc->cpuctrl0 = mc_ctrl0;
+	sgimc->cpuctrl0 &= ~SGIMC_CCTRL0_WDOG;
 	spin_unlock(&indydog_lock);
 
 	pr_info("Stopped watchdog timer\n");
drivers/watchdog/intel_scu_watchdog.c +1 -3
index e13e65e..0caab62 100644
@@ -211,7 +211,6 @@ static int intel_scu_set_heartbeat(u32 t)
 	int			 ipc_ret;
 	int			 retry_count;
 	u32			 soft_value;
-	u32			 hw_pre_value;
 	u32			 hw_value;
 
 	watchdog_device.timer_set = t;
@@ -273,8 +272,7 @@ static int intel_scu_set_heartbeat(u32 t)
 			watchdog_device.timer_load_count_addr);
 
 		/* read count value before starting timer */
-		hw_pre_value = ioread32(watchdog_device.timer_load_count_addr);
-		hw_pre_value = hw_pre_value & 0xFFFF0000;
+		ioread32(watchdog_device.timer_load_count_addr);
 
 		/* Start the timer */
 		iowrite32(0x00000003, watchdog_device.timer_control_addr);
drivers/watchdog/it87_wdt.c +31 -10

121 lines not on this page · raw message

drivers/watchdog/jz4740_wdt.c +0 -1
index 3aa50cf..91e45ca 100644
@@ -18,7 +18,6 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/device.h>
drivers/watchdog/max63xx_wdt.c +0 -1
index bdb3f4a..0e9cc6f 100644
@@ -20,7 +20,6 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/bitops.h>
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
drivers/watchdog/mpc8xxx_wdt.c +1 -0
index c1f65b4..7831955 100644
@@ -237,6 +237,7 @@ static const struct of_device_id mpc8xxx_wdt_match[] = {
 		.compatible = "fsl,mpc823-wdt",
 		.data = &(struct mpc8xxx_wdt_type) {
 			.prescaler = 0x800,
+			.hw_enabled = true,
 		},
 	},
 	{},
drivers/watchdog/mtx-1_wdt.c +0 -1
index edb31ff..ff27c4a 100644
@@ -40,7 +40,6 @@
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/timer.h>
 #include <linux/completion.h>
drivers/watchdog/nuc900_wdt.c +0 -1
index a0d893b..7135803 100644
@@ -12,7 +12,6 @@
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/clk.h>
 #include <linux/kernel.h>
drivers/watchdog/of_xilinx_wdt.c +116 -274

480 lines not on this page · raw message

drivers/watchdog/omap_wdt.c +6 -17
index 09cf013..3691b15 100644
@@ -34,7 +34,6 @@
 #include <linux/mm.h>
 #include <linux/watchdog.h>
 #include <linux/reboot.h>
-#include <linux/init.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
 #include <linux/moduleparam.h>
@@ -58,7 +57,6 @@ struct omap_wdt_dev {
 	void __iomem    *base;          /* physical */
 	struct device   *dev;
 	bool		omap_wdt_users;
-	struct resource *mem;
 	int		wdt_trgr_pattern;
 	struct mutex	lock;		/* to avoid races with PM */
 };
@@ -207,7 +205,7 @@ static int omap_wdt_probe(struct platform_device *pdev)
 {
 	struct omap_wd_timer_platform_data *pdata = dev_get_platdata(&pdev->dev);
 	struct watchdog_device *omap_wdt;
-	struct resource *res, *mem;
+	struct resource *res;
 	struct omap_wdt_dev *wdev;
 	u32 rs;
 	int ret;
@@ -216,29 +214,20 @@ static int omap_wdt_probe(struct platform_device *pdev)
 	if (!omap_wdt)
 		return -ENOMEM;
 
-	/* reserve static register mappings */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
-	mem = devm_request_mem_region(&pdev->dev, res->start,
-				      resource_size(res), pdev->name);
-	if (!mem)
-		return -EBUSY;
-
 	wdev = devm_kzalloc(&pdev->dev, sizeof(*wdev), GFP_KERNEL);
 	if (!wdev)
 		return -ENOMEM;
 
 	wdev->omap_wdt_users	= false;
-	wdev->mem		= mem;
 	wdev->dev		= &pdev->dev;
 	wdev->wdt_trgr_pattern	= 0x1234;
 	mutex_init(&wdev->lock);
 
-	wdev->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
-	if (!wdev->base)
-		return -ENOMEM;
+	/* reserve static register mappings */
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	wdev->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(wdev->base))
+		return PTR_ERR(wdev->base);
 
 	omap_wdt->info	      = &omap_wdt_info;
 	omap_wdt->ops	      = &omap_wdt_ops;
drivers/watchdog/orion_wdt.c +0 -1
index f7722a4..4981634 100644
@@ -18,7 +18,6 @@
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/spinlock.h>
 #include <linux/clk.h>
drivers/watchdog/pc87413_wdt.c +3 -4
index 5211d56..9f15dd9 100644
@@ -512,9 +512,8 @@ static int __init pc87413_init(void)
 		return -EBUSY;
 
 	ret = register_reboot_notifier(&pc87413_notifier);
-	if (ret != 0) {
+	if (ret != 0)
 		pr_err("cannot register reboot notifier (err=%d)\n", ret);
-	}
 
 	ret = misc_register(&pc87413_miscdev);
 	if (ret != 0) {
@@ -575,8 +574,8 @@ static void __exit pc87413_exit(void)
 module_init(pc87413_init);
 module_exit(pc87413_exit);
 
-MODULE_AUTHOR("Sven Anders <[email protected]>, "
-		"Marcus Junker <[email protected]>,");
+MODULE_AUTHOR("Sven Anders <[email protected]>");
+MODULE_AUTHOR("Marcus Junker <[email protected]>");
 MODULE_DESCRIPTION("PC87413 WDT driver");
 MODULE_LICENSE("GPL");
 
drivers/watchdog/pcwd_usb.c +1 -3
index e562e04..1a11aed 100644
@@ -645,10 +645,8 @@ static int usb_pcwd_probe(struct usb_interface *interface,
 
 	/* allocate memory for our device and initialize it */
 	usb_pcwd = kzalloc(sizeof(struct usb_pcwd_private), GFP_KERNEL);
-	if (usb_pcwd == NULL) {
-		pr_err("Out of memory\n");
+	if (usb_pcwd == NULL)
 		goto error;
-	}
 
 	usb_pcwd_device = usb_pcwd;
 
drivers/watchdog/pnx4008_wdt.c +0 -1
index 5bec20f..15fb316 100644
@@ -24,7 +24,6 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/spinlock.h>
drivers/watchdog/rdc321x_wdt.c +0 -1
index 082d062..29cf4dc 100644
@@ -27,7 +27,6 @@
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
 #include <linux/fs.h>
-#include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/timer.h>
 #include <linux/completion.h>
drivers/watchdog/retu_wdt.c +0 -1
index f53615d..a7a0695 100644
@@ -16,7 +16,6 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/device.h>
drivers/watchdog/riowd.c +0 -1
index 3dd8ed2..cfed0fe 100644
@@ -10,7 +10,6 @@
 #include <linux/types.h>
 #include <linux/fs.h>
 #include <linux/errno.h>
-#include <linux/init.h>
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
 #include <linux/of.h>
drivers/watchdog/s3c2410_wdt.c +5 -4
index aec946d..7c6ccd0 100644
@@ -30,7 +30,6 @@
 #include <linux/types.h>
 #include <linux/timer.h>
 #include <linux/watchdog.h>
-#include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
@@ -526,7 +525,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	clk_prepare_enable(wdt->clock);
+	ret = clk_prepare_enable(wdt->clock);
+	if (ret < 0) {
+		dev_err(dev, "failed to enable clock\n");
+		return ret;
+	}
 
 	ret = s3c2410wdt_cpufreq_register(wdt);
 	if (ret < 0) {
@@ -608,7 +611,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 
  err_clk:
 	clk_disable_unprepare(wdt->clock);
-	wdt->clock = NULL;
 
  err:
 	return ret;
@@ -628,7 +630,6 @@ static int s3c2410wdt_remove(struct platform_device *dev)
 	s3c2410wdt_cpufreq_deregister(wdt);
 
 	clk_disable_unprepare(wdt->clock);
-	wdt->clock = NULL;
 
 	return 0;
 }
drivers/watchdog/sc520_wdt.c +1 -2
index f353e18..1cfd3f6 100644
@@ -158,12 +158,11 @@ static void wdt_timer_ping(unsigned long data)
 
 static void wdt_config(int writeval)
 {
-	__u16 dummy;
 	unsigned long flags;
 
 	/* buy some time (ping) */
 	spin_lock_irqsave(&wdt_spinlock, flags);
-	dummy = readw(wdtmrctl);	/* ensure write synchronization */
+	readw(wdtmrctl);	/* ensure write synchronization */
 	writew(0xAAAA, wdtmrctl);
 	writew(0x5555, wdtmrctl);
 	/* unlock WDT = make WDT configuration register writable one time */
drivers/watchdog/shwdt.c +0 -2
index af3528f..d04d02b 100644
@@ -293,8 +293,6 @@ static int sh_wdt_probe(struct platform_device *pdev)
 
 static int sh_wdt_remove(struct platform_device *pdev)
 {
-	struct sh_wdt *wdt = platform_get_drvdata(pdev);
-
 	watchdog_unregister_device(&sh_wdt_dev);
 
 	pm_runtime_disable(&pdev->dev);
drivers/watchdog/softdog.c +1 -1
index c04a1aa..0dc5e32 100644
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(nowayout,
 		"Watchdog cannot be stopped once started (default="
 				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
-static int soft_noboot = 0;
+static int soft_noboot;
 module_param(soft_noboot, int, 0);
 MODULE_PARM_DESC(soft_noboot,
 	"Softdog action, set to 1 to ignore reboots, 0 to reboot (default=0)");
drivers/watchdog/sp805_wdt.c +3 -16
index 3f786ce..47629d2 100644
@@ -16,7 +16,6 @@
 #include <linux/amba/bus.h>
 #include <linux/bitops.h>
 #include <linux/clk.h>
-#include <linux/init.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/kernel.h>
@@ -209,27 +208,15 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id)
 	struct sp805_wdt *wdt;
 	int ret = 0;
 
-	if (!devm_request_mem_region(&adev->dev, adev->res.start,
-				resource_size(&adev->res), "sp805_wdt")) {
-		dev_warn(&adev->dev, "Failed to get memory region resource\n");
-		ret = -ENOENT;
-		goto err;
-	}
-
 	wdt = devm_kzalloc(&adev->dev, sizeof(*wdt), GFP_KERNEL);
 	if (!wdt) {
-		dev_warn(&adev->dev, "Kzalloc failed\n");
 		ret = -ENOMEM;
 		goto err;
 	}
 
-	wdt->base = devm_ioremap(&adev->dev, adev->res.start,
-			resource_size(&adev->res));
-	if (!wdt->base) {
-		ret = -ENOMEM;
-		dev_warn(&adev->dev, "ioremap fail\n");
-		goto err;
-	}
+	wdt->base = devm_ioremap_resource(&adev->dev, &adev->res);
+	if (IS_ERR(wdt->base))
+		return PTR_ERR(wdt->base);
 
 	wdt->clk = devm_clk_get(&adev->dev, NULL);
 	if (IS_ERR(wdt->clk)) {
drivers/watchdog/stmp3xxx_rtc_wdt.c +0 -1
index bb64ae3..3804d5e 100644
@@ -9,7 +9,6 @@
  * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
-#include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/watchdog.h>
drivers/watchdog/sunxi_wdt.c +1 -1
index 76332d8..cd00a78 100644
@@ -205,7 +205,7 @@ static void sunxi_wdt_shutdown(struct platform_device *pdev)
 }
 
 static const struct of_device_id sunxi_wdt_dt_ids[] = {
-	{ .compatible = "allwinner,sun4i-wdt" },
+	{ .compatible = "allwinner,sun4i-a10-wdt" },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sunxi_wdt_dt_ids);
drivers/watchdog/tegra_wdt.c new file +302 -0

302 lines not on this page · raw message

drivers/watchdog/ts72xx_wdt.c +2 -4
index 09d4831..afa9d6e 100644
@@ -61,7 +61,7 @@ struct ts72xx_wdt {
 	struct platform_device *pdev;
 };
 
-struct platform_device *ts72xx_wdt_pdev;
+static struct platform_device *ts72xx_wdt_pdev;
 
 /*
  * TS-72xx Watchdog supports following timeouts (value written
@@ -394,10 +394,8 @@ static int ts72xx_wdt_probe(struct platform_device *pdev)
 	int error = 0;
 
 	wdt = devm_kzalloc(&pdev->dev, sizeof(struct ts72xx_wdt), GFP_KERNEL);
-	if (!wdt) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!wdt)
 		return -ENOMEM;
-	}
 
 	r1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	wdt->control_reg = devm_ioremap_resource(&pdev->dev, r1);
drivers/watchdog/w83697hf_wdt.c +2 -2
index 68b45fc..e9ea856 100644
@@ -455,6 +455,6 @@ module_init(wdt_init);
 module_exit(wdt_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Marcus Junker <[email protected]>, "
-		"Samuel Tardieu <[email protected]>");
+MODULE_AUTHOR("Marcus Junker <[email protected]>");
+MODULE_AUTHOR("Samuel Tardieu <[email protected]>");
 MODULE_DESCRIPTION("w83697hf/hg WDT driver");
drivers/watchdog/wdt285.c +1 -2
index 7355ddd..ebbb183 100644
@@ -139,9 +139,8 @@ static const struct watchdog_info ident = {
 static long watchdog_ioctl(struct file *file, unsigned int cmd,
 			   unsigned long arg)
 {
-	unsigned int new_margin;
 	int __user *int_arg = (int __user *)arg;
-	int ret = -ENOTTY;
+	int new_margin, ret = -ENOTTY;
 
 	switch (cmd) {
 	case WDIOC_GETSUPPORT:
drivers/watchdog/wdt_pci.c +0 -1
index 3dc578e..48b2c05 100644
@@ -49,7 +49,6 @@
 #include <linux/delay.h>
 #include <linux/notifier.h>
 #include <linux/reboot.h>
-#include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/pci.h>
 #include <linux/io.h>
drivers/watchdog/wm831x_wdt.c +0 -1
index e243bd0..2fa17e7 100644
@@ -204,7 +204,6 @@ static int wm831x_wdt_probe(struct platform_device *pdev)
 	driver_data = devm_kzalloc(&pdev->dev, sizeof(*driver_data),
 				   GFP_KERNEL);
 	if (!driver_data) {
-		dev_err(wm831x->dev, "Unable to alloacate watchdog device\n");
 		ret = -ENOMEM;
 		goto err;
 	}