watchdog - v3.1 additions
Subsystems (11)
Hi Linus,
Please pull from 'master' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog.git
or if master.kernel.org hasn't synced up yet:
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-watchdog.git
This will update the following files:
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt | 14 Documentation/devicetree/bindings/watchdog/samsung-wdt.txt | 11 Documentation/watchdog/00-INDEX | 2 Documentation/watchdog/watchdog-kernel-api.txt | 162 ++++ arch/arm/mach-at91/include/mach/at91_wdt.h | 37 - drivers/watchdog/Kconfig | 36 + drivers/watchdog/Makefile | 8 drivers/watchdog/at91sam9_wdt.c | 21 drivers/watchdog/at91sam9_wdt.h | 37 + drivers/watchdog/dw_wdt.c | 376 +++++++++++ drivers/watchdog/hpwdt.c | 104 ++- drivers/watchdog/iTCO_wdt.c | 412 ++++-------- drivers/watchdog/imx2_wdt.c | 6 drivers/watchdog/it8712f_wdt.c | 63 + drivers/watchdog/it87_wdt.c | 168 ++--- drivers/watchdog/mpcore_wdt.c | 23 drivers/watchdog/mtx-1_wdt.c | 4 drivers/watchdog/of_xilinx_wdt.c | 433 +++++++++++++ drivers/watchdog/pc87413_wdt.c | 96 +- drivers/watchdog/s3c2410_wdt.c | 10 drivers/watchdog/sch311x_wdt.c | 5 drivers/watchdog/sp805_wdt.c | 5 drivers/watchdog/watchdog_core.c | 111 +++ drivers/watchdog/watchdog_dev.c | 395 +++++++++++ drivers/watchdog/watchdog_dev.h | 33 include/linux/watchdog.h | 78 ++ 26 files changed, 2142 insertions(+), 508 deletions(-)
with these Changes:
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 19:00:16 2011 +0000
watchdog: WatchDog Timer Driver Core - Add minimum and max timeout
Add min_timeout (minimum timeout) and max_timeout values so that the framework can check if the new timeout value is between the minimum and maximum timeout values. If both values are 0, then the framework will leave the check for the watchdog device driver itself.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:59:49 2011 +0000
watchdog: WatchDog Timer Driver Core - Add ioctl call
Add support for extra ioctl calls by adding a ioctl watchdog operation. This operation will be called before we do our own handling of ioctl commands. This way we can override the internal ioctl command handling and we can also add extra ioctl commands. The ioctl watchdog operation should return the appropriate error codes or -ENOIOCTLCMD if the ioctl command should be handled through the internal ioctl handling of the framework.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:59:17 2011 +0000
watchdog: WatchDog Timer Driver Core - Add nowayout feature
Add support for the nowayout feature to the WatchDog Timer Driver Core framework.
This feature prevents the watchdog timer from being stopped.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:58:54 2011 +0000
watchdog: WatchDog Timer Driver Core - Add Magic Close feature
Add support for the Magic Close feature to the WatchDog Timer Driver Core framework.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:58:21 2011 +0000
watchdog: WatchDog Timer Driver Core - Add WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl
This part add's the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl functionality to the WatchDog Timer Driver Core framework.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:57:55 2011 +0000
watchdog: WatchDog Timer Driver Core - Add WDIOC_SETOPTIONS ioctl
This part add's the WDIOC_SETOPTIONS ioctl functionality to the WatchDog Timer Driver Core framework.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:57:23 2011 +0000
watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl
This part add's the WDIOC_KEEPALIVE ioctl functionality to the WatchDog Timer Driver Core framework. Please note that the WDIOF_KEEPALIVEPING bit has to be set in the watchdog_info options field.
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:56:38 2011 +0000
watchdog: WatchDog Timer Driver Core - Add basic ioctl functionality
This part add's the basic ioctl functionality to the WatchDog Timer Driver Core framework. The supported ioctl call's are:
WDIOC_GETSUPPORT
WDIOC_GETSTATUS
WDIOC_GETBOOTSTATUS
Author: Wim Van Sebroeck <[email protected]> Date: Fri Jul 22 18:55:18 2011 +0000
watchdog: WatchDog Timer Driver Core - Add basic framework
The WatchDog Timer Driver Core is a framework that contains the common code for all watchdog-driver's. It also introduces a watchdog device structure and the operations that go with it.
This is the introduction of this framework. This part supports the minimal watchdog userspace API (or with other words: the functionality to use /dev/watchdog's open, release and write functionality as defined in the simplest watchdog API). Extra functionality will follow in the next set of patches.
Author: Thomas Mingarelli <[email protected]> Date: Tue Jul 26 14:05:53 2011 +0100
watchdog: hpwdt: add next gen HP servers
This patch is required to enable hpwdt to work on next generation HP servers with iLO.
Author: Wim Van Sebroeck <[email protected]> Date: Mon Jul 25 18:53:00 2011 +0000
watchdog: it8712f_wdt.c: improve includes
remove unneeded pci.h include.
and include ioport.h to avoid build errors for the region functions.
Author: Jean-Christophe Plagniol-Villard <[email protected]> Date: Fri Jul 15 01:52:05 2011 +0200
watchdog: at91sam9/wdt: move register header to drivers
move register header to drivers
Author: Alejandro Cabrera <[email protected]> Date: Thu Jun 2 22:13:11 2011 +0100
watchdog: Add Xilinx watchdog timer driver
Watchdog timer device driver for Xilinx xps_timebase_wdt compatible ip cores. It takes watchdog timer configuration from device tree and it needs that its parent has defined the property "clock-frecuency".
It is compatible with watchdog timer kernel API, so user apps like watchdogd may talk with it.
Author: Wolfram Sang <[email protected]> Date: Thu Jul 14 12:53:00 2011 +0200
watchdog: remove empty pm-functions
While checking what watchdog drivers usually do in suspend/resume to spot common behaviour for the watchdog framework, I found these drivers which do nothing but add some cruft. Remove it, it is superfluous. New approaches should probably be done with pm_ops anyway.
Author: Nick Bowler <[email protected]> Date: Fri Jul 15 11:04:02 2011 -0400
watchdog: sp805: Flush posted writes in enable/disable.
There are no reads in these functions, so if MMIO writes are posted, the writes in enable/disable may not have completed by the time these functions return. If the functions run from different CPUs, it's in theory possible for the writes to be interleaved, which would be disastrous for this driver.
At the very least, we need an mmiowb() before releasing the lock, but since it seems desirable for the watchdog timer to be actually stopped or reset when these functions return, read the lock register to force the writes out.
Author: Nick Bowler <[email protected]> Date: Fri Jul 15 11:04:01 2011 -0400
watchdog: sp805: Don't write 0 to the load value register.
At least on the Versatile Express' V2M, calling wdt_disable followed by wdt_enable, for instance by running the following sequence:
echo V > /dev/watchdog; echo V > /dev/watchdog
results in an immediate reset. The wdt_disable function writes 0 to the load register; while the watchdog interrupts are disabled at this point, this special value is defined to trigger an interrupt immediately. It appears that in this instance, the reset happens when the interrupts are subsequently enabled by wdt_enable.
Putting in a short delay after writing a new load value in wdt_enable solves the issue, but it seems cleaner to simply never write 0 to the load register at all: according to the hardware docs, writing 0 to the control register suffices to stop the counter, and the write of 0 to the load register is questionable anyway since this register resets to 0xffffffff.
Author: Shawn Guo <[email protected]> Date: Mon Jul 18 11:15:21 2011 +0800
watchdog: imx2_wdt: add device tree probe support
Adds device tree probe support for imx2_wdt driver.
Author: Thomas Abraham <[email protected]> Date: Wed Jun 22 15:24:32 2011 +0530
watchdog: s3c2410: Add support for device tree based probe
This patch adds the of_match_table to enable s3c2410-wdt driver to be probed when watchdog device node is found in the device tree.
Author: Peter Fordham <[email protected]> Date: Wed Jun 15 13:18:32 2011 -0700
watchdog: mpcore_wdt: Add suspend/resume support.
Add support for suspend and resume to the MPCore watchdog driver.
Author: Florian Fainelli <[email protected]> Date: Wed Jun 15 19:15:09 2011 +0200
watchdog: mtx1-wdt: use dev_{err,info} instead of printk()
use dev_{err,info} instead of printk(KERN_{ERR,INFO} ...)
Author: Sascha Hauer <[email protected]> Date: Thu Mar 3 14:30:59 2011 +0100
watchdog: i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on
The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.
Author: Jamie Iles <[email protected]> Date: Mon Jan 24 12:19:12 2011 +0000
watchdog: add support for the Synopsys DesignWare WDT
The Synopsys DesignWare watchdog is found in several ARM based systems and provides a choice of 16 timeout periods depending on the clock input. The watchdog cannot be disabled once started.
Author: Jonathan McDowell <[email protected]> Date: Thu Apr 14 12:02:39 2011 -0700
watchdog: pc87413_wdt: Cleanup pc87413 watchdog driver to use
Inspired by Nat Gurumoorthy's recent patches for cleaning up the it87 drivers to use request_muxed_region for accessing the SuperIO area on these chips, and the fact I have a GPIO driver for the pc8741x basically ready for submission, here is a patch to cleanup the pc87413 watchdog driver to use request_muxed_region for accessing the SuperIO area.
It also pulls out the details about the SWC IO area on initial driver load, and properly does a request_region for that area - there's no requirement to touch the SuperIO area after doing the initial watchdog enable and IO base retrieval.
While I have hardware with a pc87413 on it it is not wired in a way that allows the watchdog to reboot the machine, so I have not been able to fully test these changes - I have checked that the driver correctly initialises itself still and requests the SWC io region ok.
Author: Wim Van Sebroeck <[email protected]> Date: Fri May 20 08:28:48 2011 +0000
watchdog: iTCO_wdt: clean-up PCI device ID's
Clean up of the iTCO_wdt PCI device ID's. Own macro is replaced by the PCI_VDEVICE macro.
Author: Nat Gurumoorthy <[email protected]> Date: Mon May 9 11:45:07 2011 -0700
watchdog: Use "request_muxed_region" in it87 watchdog drivers
Changes the it87 watchdog drivers to use "request_muxed_region". Serialize access to the hardware by using "request_muxed_region" macro defined by Alan Cox. Call to this macro will hold off the requestor if the resource is currently busy.
The use of the above macro makes it possible to get rid of spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers. This also greatly simplifies the implementation of it87_wdt.c driver.
"superio_enter" will return an error if call to "request_muxed_region" fails.
Rest of the code change is to ripple an error return from superio_enter to the top level.
The Changes can also be looked at on:
http://www.kernel.org/git/?p=linux/kernel/git/wim/linux-watchdog.git;a=summary
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
Documentation/devicetree/bindings/watchdog/fsl-imx-wdt.txt new file +14 -0
@@ -0,0 +1,14 @@ +* Freescale i.MX Watchdog Timer (WDT) Controller + +Required properties: +- compatible : Should be "fsl,<soc>-wdt" +- reg : Should contain WDT registers location and length +- interrupts : Should contain WDT interrupt + +Examples: + +wdt@73f98000 { + compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; + reg = <0x73f98000 0x4000>; + interrupts = <58>; +};
Documentation/devicetree/bindings/watchdog/samsung-wdt.txt new file +11 -0
@@ -0,0 +1,11 @@ +* Samsung's Watchdog Timer Controller + +The Samsung's Watchdog controller is used for resuming system operation +after a preset amount of time during which the WDT reset event has not +occured. + +Required properties: +- compatible : should be "samsung,s3c2410-wdt" +- reg : base physical address of the controller and length of memory mapped + region. +- interrupts : interrupt number to the cpu.
Documentation/watchdog/00-INDEX +2 -0
@@ -8,6 +8,8 @@ src/ - directory holding watchdog related example programs. watchdog-api.txt - description of the Linux Watchdog driver API. +watchdog-kernel-api.txt + - description of the Linux WatchDog Timer Driver Core kernel API. watchdog-parameters.txt - information on driver parameters (for drivers other than the ones that have driver-specific files here)
Documentation/watchdog/watchdog-kernel-api.txt new file +162 -0
162 lines not on this page · raw message
arch/arm/mach-at91/include/mach/at91_wdt.h deleted +0 -37
@@ -1,37 +0,0 @@ -/* -* arch/arm/mach-at91/include/mach/at91_wdt.h -* -* Copyright (C) 2007 Andrew Victor -* Copyright (C) 2007 Atmel Corporation. -* -* Watchdog Timer (WDT) - System peripherals regsters. -* Based on AT91SAM9261 datasheet revision D. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -*/ - -#ifndef AT91_WDT_H -#define AT91_WDT_H - -#define AT91_WDT_CR (AT91_WDT + 0x00)/* Watchdog Control Register */ -#define AT91_WDT_WDRSTT (1 << 0)/* Restart */ -#define AT91_WDT_KEY (0xa5 << 24)/* KEY Password */ - -#define AT91_WDT_MR (AT91_WDT + 0x04)/* Watchdog Mode Register */ -#define AT91_WDT_WDV (0xfff << 0)/* Counter Value */ -#define AT91_WDT_WDFIEN (1 << 12)/* Fault Interrupt Enable */ -#define AT91_WDT_WDRSTEN (1 << 13)/* Reset Processor */ -#define AT91_WDT_WDRPROC (1 << 14)/* Timer Restart */ -#define AT91_WDT_WDDIS (1 << 15)/* Watchdog Disable */ -#define AT91_WDT_WDD (0xfff << 16)/* Delta Value */ -#define AT91_WDT_WDDBGHLT (1 << 28)/* Debug Halt */ -#define AT91_WDT_WDIDLEHLT (1 << 29)/* Idle Halt */ - -#define AT91_WDT_SR (AT91_WDT + 0x08)/* Watchdog Status Register */ -#define AT91_WDT_WDUNF (1 << 0)/* Watchdog Underflow */ -#define AT91_WDT_WDERR (1 << 1)/* Watchdog Error */ - -#endif
drivers/watchdog/Kconfig +35 -1
@@ -28,6 +28,17 @@ menuconfig WATCHDOG if WATCHDOG +config WATCHDOG_CORE + bool "WatchDog Timer Driver Core" + ---help--- + Say Y here if you want to use the new watchdog timer driver core. + This driver provides a framework for all watchdog timer drivers + and gives them the /dev/watchdog interface (and later also the + sysfs interface). + + To compile this driver as a module, choose M here: the module will + be called watchdog. + config WATCHDOG_NOWAYOUT bool "Disable watchdog shutdown on close" help
@@ -186,6 +197,15 @@ config SA1100_WATCHDOG To compile this driver as a module, choose M here: the module will be called sa1100_wdt. +config DW_WATCHDOG + tristate "Synopsys DesignWare watchdog" + depends on ARM && HAVE_CLK + help + Say Y here if to include support for the Synopsys DesignWare + watchdog timer found in many ARM chips. + To compile this driver as a module, choose M here: the + module will be called dw_wdt. + config MPCORE_WATCHDOG tristate "MPcore watchdog" depends on HAVE_ARM_TWD
@@ -321,7 +341,7 @@ config MAX63XX_WATCHDOG config IMX2_WDT tristate "IMX2+ Watchdog" - depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3 || ARCH_MX5 + depends on IMX_HAVE_PLATFORM_IMX2_WDT help This is the driver for the hardware watchdog on the Freescale IMX2 and later processors.
@@ -879,6 +899,20 @@ config M54xx_WATCHDOG To compile this driver as a module, choose M here: the module will be called m54xx_wdt. +# 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
drivers/watchdog/Makefile +8 -0
@@ -2,6 +2,10 @@ # Makefile for the WatchDog device drivers. # +# The WatchDog Timer Driver Core. +watchdog-objs += watchdog_core.o watchdog_dev.o +obj-$(CONFIG_WATCHDOG_CORE) += watchdog.o + # Only one watchdog can succeed. We probe the ISA/PCI/USB based # watchdog-cards first, then the architecture specific watchdog # drivers and then the architecture independent "softdog" driver.
@@ -37,6 +41,7 @@ obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o +obj-$(CONFIG_DW_WATCHDOG) += dw_wdt.o obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
@@ -109,6 +114,9 @@ obj-$(CONFIG_INTEL_SCU_WATCHDOG) += intel_scu_watchdog.o # M68K Architecture obj-$(CONFIG_M54xx_WATCHDOG) += m54xx_wdt.o +# MicroBlaze Architecture +obj-$(CONFIG_XILINX_WATCHDOG) += of_xilinx_wdt.o + # MIPS Architecture obj-$(CONFIG_ATH79_WDT) += ath79_wdt.o obj-$(CONFIG_BCM47XX_WDT) += bcm47xx_wdt.o
drivers/watchdog/at91sam9_wdt.c +1 -20
@@ -31,7 +31,7 @@#include <linux/bitops.h> #include <linux/uaccess.h> -#include <mach/at91_wdt.h> +#include "at91sam9_wdt.h" #define DRV_NAME "AT91SAM9 Watchdog"
@@ -284,27 +284,8 @@ static int __exit at91wdt_remove(struct platform_device *pdev)return res; } -#ifdef CONFIG_PM - -static int at91wdt_suspend (struct platform_device *pdev,pm_message_t message) -{ -return 0 ; -} - -static int at91wdt_resume (struct platform_device *pdev) -{ -return 0 ; -} - -#else -#define at91wdt_suspend NULL -#define at91wdt_resume NULL -#endif -static struct platform_driver at91wdt_driver = { .remove =__exit_p (at91wdt_remove), - .suspend = at91wdt_suspend, - .resume = at91wdt_resume, .driver = { .name ="at91_wdt" , .owner =THIS_MODULE ,
drivers/watchdog/at91sam9_wdt.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* drivers/watchdog/at91sam9_wdt.h +* +* Copyright (C) 2007 Andrew Victor +* Copyright (C) 2007 Atmel Corporation. +* +* Watchdog Timer (WDT) - System peripherals regsters. +* Based on AT91SAM9261 datasheet revision D. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef AT91_WDT_H +#define AT91_WDT_H + +#define AT91_WDT_CR (AT91_WDT + 0x00)/* Watchdog Control Register */ +#define AT91_WDT_WDRSTT (1 << 0)/* Restart */ +#define AT91_WDT_KEY (0xa5 << 24)/* KEY Password */ + +#define AT91_WDT_MR (AT91_WDT + 0x04)/* Watchdog Mode Register */ +#define AT91_WDT_WDV (0xfff << 0)/* Counter Value */ +#define AT91_WDT_WDFIEN (1 << 12)/* Fault Interrupt Enable */ +#define AT91_WDT_WDRSTEN (1 << 13)/* Reset Processor */ +#define AT91_WDT_WDRPROC (1 << 14)/* Timer Restart */ +#define AT91_WDT_WDDIS (1 << 15)/* Watchdog Disable */ +#define AT91_WDT_WDD (0xfff << 16)/* Delta Value */ +#define AT91_WDT_WDDBGHLT (1 << 28)/* Debug Halt */ +#define AT91_WDT_WDIDLEHLT (1 << 29)/* Idle Halt */ + +#define AT91_WDT_SR (AT91_WDT + 0x08)/* Watchdog Status Register */ +#define AT91_WDT_WDUNF (1 << 0)/* Watchdog Underflow */ +#define AT91_WDT_WDERR (1 << 1)/* Watchdog Error */ + +#endif
drivers/watchdog/dw_wdt.c new file +376 -0
376 lines not on this page · raw message
drivers/watchdog/hpwdt.c +77 -27
145 lines not on this page · raw message
drivers/watchdog/iTCO_wdt.c +139 -273
447 lines not on this page · raw message
drivers/watchdog/imx2_wdt.c +6 -0
@@ -329,12 +329,18 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) } } +static const struct of_device_id imx2_wdt_dt_ids[] = { + { .compatible ="fsl,imx21-wdt" , }, + {/* sentinel */ } +}; +static struct platform_driver imx2_wdt_driver = { .remove =__exit_p (imx2_wdt_remove), .shutdown = imx2_wdt_shutdown, .driver = { .name =DRIVER_NAME , .owner =THIS_MODULE , + .of_match_table = imx2_wdt_dt_ids, }, };
drivers/watchdog/it8712f_wdt.c +45 -18
171 lines not on this page · raw message
drivers/watchdog/it87_wdt.c +90 -78
348 lines not on this page · raw message
drivers/watchdog/mpcore_wdt.c +23 -0
@@ -407,12 +407,35 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev)return 0 ; } +#ifdef CONFIG_PM +static int mpcore_wdt_suspend (struct platform_device *dev,pm_message_t msg) +{ +struct mpcore_wdt *wdt =platform_get_drvdata (dev); +mpcore_wdt_stop (wdt);/* Turn the WDT off */ +return 0 ; +} + +static int mpcore_wdt_resume (struct platform_device *dev) +{ +struct mpcore_wdt *wdt =platform_get_drvdata (dev); +/* re-activate timer */ +if (test_bit (0 , &wdt->timer_alive)) +mpcore_wdt_start (wdt); +return 0 ; +} +#else +#define mpcore_wdt_suspend NULL +#define mpcore_wdt_resume NULL +#endif +/* work with hotplug and coldplug */ MODULE_ALIAS ("platform:mpcore_wdt" );static struct platform_driver mpcore_wdt_driver = { .probe = mpcore_wdt_probe, .remove =__devexit_p (mpcore_wdt_remove), + .suspend = mpcore_wdt_suspend, + .resume = mpcore_wdt_resume, .shutdown = mpcore_wdt_shutdown, .driver = { .owner =THIS_MODULE ,
drivers/watchdog/mtx-1_wdt.c +2 -2
@@ -225,11 +225,11 @@ static int __devinit mtx1_wdt_probe(struct platform_device *pdev) ret =misc_register (&mtx1_wdt_misc);if (ret <0 ) { -printk (KERN_ERR " mtx-1_wdt : failed to register\n" ); +dev_err (&pdev->dev,"failed to register\n" );return ret; }mtx1_wdt_start (); -printk (KERN_INFO "MTX-1 Watchdog driver\n" ); +dev_info (&pdev->dev,"MTX-1 Watchdog driver\n" );return 0 ; }
drivers/watchdog/of_xilinx_wdt.c new file +433 -0
433 lines not on this page · raw message
drivers/watchdog/pc87413_wdt.c +50 -46
201 lines not on this page · raw message
drivers/watchdog/s3c2410_wdt.c +10 -0
@@ -589,6 +589,15 @@ static int s3c2410wdt_resume(struct platform_device *dev)#define s3c2410wdt_resume NULL#endif /* CONFIG_PM */ +#ifdef CONFIG_OF +static const struct of_device_id s3c2410_wdt_match[] = { + { .compatible ="samsung,s3c2410-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE (of, s3c2410_wdt_match); +#else +#define s3c2410_wdt_match NULL +#endif static struct platform_driver s3c2410wdt_driver = { .probe = s3c2410wdt_probe,
@@ -599,6 +608,7 @@ static struct platform_driver s3c2410wdt_driver = { .driver = { .owner = THIS_MODULE, .name = "s3c2410-wdt", + .of_match_table = s3c2410_wdt_match, }, };
drivers/watchdog/sch311x_wdt.c +0 -5
@@ -472,15 +472,10 @@ static void sch311x_wdt_shutdown(struct platform_device *dev)sch311x_wdt_stop (); } -#define sch311x_wdt_suspend NULL -#define sch311x_wdt_resume NULL -static struct platform_driver sch311x_wdt_driver = { .probe = sch311x_wdt_probe, .remove =__devexit_p (sch311x_wdt_remove), .shutdown = sch311x_wdt_shutdown, - .suspend = sch311x_wdt_suspend, - .resume = sch311x_wdt_resume, .driver = { .owner =THIS_MODULE , .name =DRV_NAME ,
drivers/watchdog/sp805_wdt.c +4 -1
@@ -134,6 +134,8 @@ static void wdt_enable(void)writel (INT_ENABLE |RESET_ENABLE , wdt->base +WDTCONTROL );writel (LOCK , wdt->base +WDTLOCK ); +/* Flush posted writes. */ +readl (wdt->base +WDTLOCK );spin_unlock (&wdt->lock); }
@@ -144,9 +146,10 @@ static void wdt_disable(void)writel (UNLOCK , wdt->base +WDTLOCK );writel (0 , wdt->base +WDTCONTROL ); -writel (0 , wdt->base +WDTLOAD );writel (LOCK , wdt->base +WDTLOCK ); +/* Flush posted writes. */ +readl (wdt->base +WDTLOCK );spin_unlock (&wdt->lock); }
drivers/watchdog/watchdog_core.c new file +111 -0
111 lines not on this page · raw message
drivers/watchdog/watchdog_dev.c new file +395 -0
256 lines not on this page · raw message
drivers/watchdog/watchdog_dev.h new file +33 -0
Lines of this file are not shown. View the raw message.
include/linux/watchdog.h +78 -0
78 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.