watchdog - v3.8
Subsystems (7)
Hi Linus,
Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git
This includes some fixes and code improvements (like clk_prepare_enable and clk_disable_unprepare), conversion from the omap_wdt and twl4030_wdt drivers to the watchdog framework, addition of the SB8x0 chipset support and the DA9055 Watchdog driver
and some OF support for the davinci_wdt driver.
This will update the following files:
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt | 12 drivers/misc/mei/wd.c | 2 drivers/watchdog/Kconfig | 18 drivers/watchdog/Makefile | 1 drivers/watchdog/ath79_wdt.c | 13 drivers/watchdog/cpu5wdt.c | 1 drivers/watchdog/da9052_wdt.c | 4 drivers/watchdog/da9055_wdt.c | 216 ++++++++ drivers/watchdog/davinci_wdt.c | 11 drivers/watchdog/hpwdt.c | 2 drivers/watchdog/mpcore_wdt.c | 19 drivers/watchdog/omap_wdt.c | 311 ++++-------- drivers/watchdog/orion_wdt.c | 2 drivers/watchdog/s3c2410_wdt.c | 6 drivers/watchdog/sp5100_tco.c | 321 ++++++++++--- drivers/watchdog/sp5100_tco.h | 46 + drivers/watchdog/sp805_wdt.c | 11 drivers/watchdog/twl4030_wdt.c | 185 +------ include/linux/watchdog.h | 2 19 files changed, 738 insertions(+), 445 deletions(-)
with these Changes:
commit d692170037c0338b31dac5ac4722c1360a4b5257
Author: Tomas Winkler <[email protected]> Date: Sun Dec 16 13:23:17 2012 +0200
watchdog: mei: avoid oops in watchdog unregister code path
With commit c7d3df3 "mei: use internal watchdog device registration tracking" will crash the kernel on shutdown path on systems where ME watchdog is not present.
Since the watchdog was never initialized in such case the WDOG_UNREGISTERED bit is never set and the system crashes on access to uninitialized variables down the path.
To solve the issue we query for NULL on watchdog driver driver_data to check whether the device is registered. This is handled in the driver and doesn't depend on watchdog core internals.
commit 8c4c419ca3bd5a5b3389114e037a9d17bdec3a5f
Author: Jason Gunthorpe <[email protected]> Date: Fri Dec 7 15:44:46 2012 -0700
watchdog: Orion: Fix possible null-deference in orion_wdt_probe
If the DT does not include a regs parameter then the null res would be dereferenced.
commit 740fbddf5c3f9ad8b23c5d917ba1cc7e376a5104
Author: Takahisa Tanaka <[email protected]> Date: Sun Dec 2 14:33:18 2012 +0900
watchdog: sp5100_tco: Add SB8x0 chipset support
The current sp5100_tco driver only supports SP5100/SB7x0 chipset, doesn't support SB8x0 chipset, because current sp5100_tco driver doesn't know that the offset address for watchdog timer was changed from SB8x0 chipset.
The offset address of SP5100 and SB7x0 chipsets are as follows, quote from the AMD SB700/710/750 Register Reference Guide (Page 164) and the AMD SP5100 Register Reference Guide (Page 166).
WatchDogTimerControl 69h
WatchDogTimerBase0 6Ch
WatchDogTimerBase1 6Dh
WatchDogTimerBase2 6Eh
WatchDogTimerBase3 6Fh
In contrast, the offset address of SB8x0 chipset is as follows, quote from AMD SB800-Series Southbridges Register Reference Guide (Page 147).
WatchDogTimerEn 48h
WatchDogTimerConfig 4Ch
So, In the case of SB8x0 chipset, sp5100_tco reads meaningless MMIO address (for example, 0xbafe00) from wrong offset address, and the following message is logged.
SP5100 TCO timer: mmio address 0xbafe00 already in use
With this patch, sp5100_tco driver supports SB8x0 chipset, and can avoid iomem resource conflict. The processing of this patch is as follows.
Step 1) Attempt to get the watchdog base address from indirect I/O (0xCD6
and 0xCD7).
- Go to the step 7 if obtained address hasn't conflicted with other resource. But, currently, the address (0xfec000f0) conflicts with the IOAPIC MMIO address, and the following message is logged.
SP5100 TCO timer: mmio address 0xfec000f0 already in use
0xfec000f0 is recommended by AMD BIOS Developer's Guide. So, go to the next step.
Step 2) Attempt to get the SBResource_MMIO base address from AcpiMmioEN (for
SB8x0, PM_Reg:24h) or SBResource_MMIO (SP5100/SB7x0, PCI_Reg:9Ch) register.
- Go to the step 7 if these register has enabled by BIOS, and obtained address hasn't conflicted with other resource.
- If above condition isn't true, go to the next step.
Step 3) Attempt to get the free MMIO address from allocate_resource().
- Go to the step 7 if these register has enabled by BIOS, and obtained address hasn't conflicted with other resource.
- Driver initialization has failed if obtained address has conflicted with other resource, and no 'force_addr' parameter is specified.
Step 4) Use the specified address If 'force_addr' parameter is specified.
- allocate_resource() function may fail, when the PCI bridge device occupies iomem resource from 0xf0000000 to 0xffffffff. To handle such a case, I added 'force_addr' parameter to sp5100_tco driver. With 'force_addr' parameter, sp5100_tco driver directly can assign MMIO address for watchdog timer from free iomem region. Note that It's dangerous to specify wrong address in the 'force_addr' parameter.
Example of force_addr parameter use
# cat /proc/iomem
...snip...
fec00000-fec003ff : IOAPIC 0
<--- free MMIO region
fec10000-fec1001f : pnp 00:0b
fec20000-fec203ff : IOAPIC 1
...snip...
# cat /etc/modprobe.d/sp5100_tco.conf
options sp5100_tco force_addr=0xfec00800
# modprobe sp5100_tco
# cat /proc/iomem
...snip...
fec00000-fec003ff : IOAPIC 0
fec00800-fec00807 : SP5100 TCO <--- watchdog timer MMIO address fec10000-fec1001f : pnp 00:0b
fec20000-fec203ff : IOAPIC 1
...snip...
#
- Driver initialization has failed if specified address has conflicted with other resource.
Step 5) Disable the watchdog timer
- To rewrite the watchdog timer register of the chipset, absolutely guarantee that the watchdog timer is disabled.
Step 6) Re-program the watchdog timer MMIO address to chipset.
- Re-program the obtained MMIO address in Step 3 or Step 4 to chipset via indirect I/O (0xCD6 and 0xCD7).
Step 7) Enable and setup the watchdog timer
This patch has worked fine on my test environment (ASUS M4A89GTD-PRO/USB3 and DL165G7). therefore I believe that it's no problem to re-program the MMIO address for watchdog timer to chipset during disabled watchdog. However, I'm not sure about it, because I don't know much about chipset programming.
So, any comments will be welcome.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43176
commit 902e2e7d482c55395652ff78cb3457fc390b101d
Author: Murali Karicheri <[email protected]> Date: Mon Nov 26 16:41:35 2012 -0500
watchdog: davinci_wdt: add OF support
This adds OF support for davinci_wdt driver.
commit 0360dffedd7bad92f174b2ce5e69e960451d2b59
Author: Tushar Behera <[email protected]> Date: Thu Nov 22 10:13:04 2012 +0530
watchdog: da9052: Fix invalid free of devm_ allocated data
It is not required to free devm_ allocated data. Since kref_put needs a valid release function, da9052_wdt_release_resources() is not deleted.
Fixes following warning. drivers/watchdog/da9052_wdt.c:59:1-6: WARNING: invalid free of devm_ allocated data
commit 2bc3f62f9627f136bb52b4cfa43060ef04656d2f
Author: Peter Ujfalusi <[email protected]> Date: Tue Nov 13 10:40:22 2012 +0100
watchdog: twl4030_wdt: Change TWL4030_MODULE_PM_RECEIVER to TWL_MODULE_PM_RECEIVER
To facilitate upcoming cleanup in twl stack.
No functional changes.
commit e1926349c2e7051d44dc8a772cd819377b815c0c
Author: Kees Cook <[email protected]> Date: Mon Nov 5 15:04:42 2012 -0800
watchdog: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it from any "depends on" lines in Kconfigs.
commit 77e0dfcc0949303bbae75cac5c598c59e67b54c9
Author: Joe Perches <[email protected]> Date: Sun Oct 28 01:05:53 2012 -0700
watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good.
commit 312b00e1c31011dd009f51a52e14a500f61f1f31
Author: Ashish Jangam <[email protected]> Date: Fri Oct 12 15:00:03 2012 +0530
watchdog: DA9055 Watchdog driver
This is the Watchdog patch for the DA9055 PMIC. This patch has got dependency on the DA9055 MFD core.
This patch is functionally tested on SMDK6410
commit 1ba85387f0224dca9f0f9d783b09c9ceeb1c91bd
Author: Aaro Koskinen <[email protected]> Date: Wed Oct 10 23:23:37 2012 +0300
watchdog: omap_wdt: eliminate goto
Eliminate a goto to simplify the code.
commit ef4817472982b3b6d993e6456cfad58dc848ef70
Author: Aaro Koskinen <[email protected]> Date: Wed Oct 10 23:23:36 2012 +0300
watchdog: omap_wdt: delete redundant platform_set_drvdata() calls
It's not needed to manually reset the driver data.
commit 4f4753d96d30cf4477eafa077ae7f1326a80c1d8
Author: Aaro Koskinen <[email protected]> Date: Wed Oct 10 23:23:33 2012 +0300
watchdog: omap_wdt: convert to devm_ functions
Use devm_kzalloc(), devm_request_mem_region() ande devm_ioremap() to simplify the code.
commit 67c0f55468443ef8a1edc6ee92f9a92e4915be24
Author: Aaro Koskinen <[email protected]> Date: Wed Oct 10 23:23:32 2012 +0300
watchdog: omap_wdt: convert to new watchdog core
Convert omap_wdt to new watchdog core. On OMAP boards, there are usually multiple watchdogs. Since the new watchdog core supports multiple watchdogs, all watchdog drivers used on OMAP should be converted.
The legacy watchdog device node is still created, so this should not break existing users.
commit cf13a84d174947df4bb809edfb4887393642303e
Author: Fabio Porcedda <[email protected]> Date: Fri Oct 5 12:16:09 2012 +0200
watchdog: WatchDog Timer Driver Core: fix comment
commit 50d854c8a72b87ffa5523aa07c5013e2c6657714
Author: Thomas Abraham <[email protected]> Date: Wed Oct 3 07:32:40 2012 +0900
watchdog: s3c2410_wdt: use clk_prepare_enable and clk_disable_unprepare
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework.
commit 2d076bb8397fea2480487e9547e34b8d4f77eb67
Author: Fabio Estevam <[email protected]> Date: Mon Jul 2 18:33:02 2012 -0300
watchdog: imx2_wdt: Select the driver via ARCH_MXC
With device tree support in place, we should not use IMX_HAVE_PLATFORM_IMX2_WDT as a dependency for selecting the imx2_wdt driver.
Use ARCH_MXC symbol instead, so that the driver can be even selected by a device-tree only SoC, such as i.MX6.
commit e09d9c3e9f85b8190ca1e495890f4cf5ee30baf6
Author: devendra.aaru <[email protected]> Date: Tue Jun 26 14:48:26 2012 +0530
watchdog: cpu5wdt.c: add missing del_timer call
We do a setup_timer at init stage of the module, but we didn't de-activate the time using del_timer.
commit e16cfb9d38541bf1591c2e0ca64a562074e25f72
Author: Tom Mingarelli <[email protected]> Date: Mon Sep 24 20:34:40 2012 +0000
watchdog: hpwdt.c: Increase version string
Changing the version of the driver for all the latest patches being applied for kdump fixes.
commit b2c4e4b2696287671723ef986f0db23cf4f52f15
Author: Jarkko Nikula <[email protected]> Date: Tue Sep 11 09:01:10 2012 +0300
watchdog: Convert twl4030_wdt to watchdog core
Convert the twl4030_wdt watchdog driver to watchdog core.
While at there use devm_kzalloc and set the default timeout in order to be able test this driver with a simple shell script.
commit 5235f57a6f460d5620acfcf236ca29ecca993325
Author: Karicheri, Muralidharan <[email protected]> Date: Thu Aug 30 18:29:10 2012 +0000
davinci_wdt: preparation for switch to common clock framework
As a first step towards migrating davinci platforms to use common clock framework, replace all instances of clk_enable() with clk_prepare_enable() and clk_disable() with clk_disable_unprepare(). Until the platform is switched to use the CONFIG_HAVE_CLK_PREPARE Kconfig variable, this just adds a might_sleep() call and would work without any issues.
This will make it easy later to switch to common clk based implementation of clk driver from DaVinci specific driver.
commit 63fbbc169674496fc2ae501d97c3905232a3bf64
Author: Julia Lawall <[email protected]> Date: Sun Aug 26 18:01:02 2012 +0200
watchdog: sp805_wdt.c: use clk_prepare_enable and clk_disable_unprepare
Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. They make the code more concise, and ensure that clk_unprepare is called when clk_enable fails.
A simplified version of the semantic patch that introduces calls to these functions is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e;
@@
- clk_prepare(e);
- clk_enable(e);
+ clk_prepare_enable(e);
@@
expression e;
@@
- clk_disable(e);
- clk_unprepare(e);
+ clk_disable_unprepare(e);
// </smpl>
commit 8157becf8db0c798e1260f3af7c495a9b88e3b57
Author: Gabor Juhos <[email protected]> Date: Tue Aug 14 15:35:19 2012 +0200
watchdog: ath79_wdt: convert to use module_platform_driver
This makes the code a bit smaller by getting rid of some boilerplate code.
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt new file +12 -0
@@ -0,0 +1,12 @@ +DaVinci Watchdog Timer (WDT) Controller + +Required properties: +- compatible : Should be "ti,davinci-wdt" +- reg : Should contain WDT registers location and length + +Examples: + +wdt: wdt@2320000 { + compatible = "ti,davinci-wdt"; + reg = <0x02320000 0x80>; +};
drivers/misc/mei/wd.c +1 -1
@@ -370,7 +370,7 @@ void mei_watchdog_register(struct mei_device *dev)void mei_watchdog_unregister (struct mei_device *dev) { -if (test_bit (WDOG_UNREGISTERED , &amt_wd_dev.status)) +if (watchdog_get_drvdata (&amt_wd_dev) ==NULL )return ;watchdog_set_drvdata (&amt_wd_dev,NULL );
drivers/watchdog/Kconfig +15 -3
@@ -76,6 +76,16 @@ config DA9052_WATCHDOG Alternatively say M to compile the driver as a module, which will be called da9052_wdt. +config DA9055_WATCHDOG + tristate "Dialog Semiconductor DA9055 Watchdog" + depends on MFD_DA9055 + help + If you say yes here you get support for watchdog on the Dialog + Semiconductor DA9055 PMIC. + + This driver can also be built as a module. If so, the module + will be called da9055_wdt. + config WM831X_WATCHDOG tristate "WM831x watchdog" depends on MFD_WM831X
@@ -232,6 +242,7 @@ config EP93XX_WATCHDOG config OMAP_WATCHDOG tristate "OMAP Watchdog" depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS + select WATCHDOG_CORE help Support for TI OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 watchdog. Say 'Y' here to enable the OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 watchdog timer.
@@ -300,6 +311,7 @@ config COH901327_WATCHDOG config TWL4030_WATCHDOG tristate "TWL4030 Watchdog" depends on TWL4030_CORE + select WATCHDOG_CORE help Support for TI TWL4030 watchdog. Say 'Y' here to enable the watchdog timer support for TWL4030 chips.
@@ -342,7 +354,7 @@ config MAX63XX_WATCHDOG config IMX2_WDT tristate "IMX2+ Watchdog" - depends on IMX_HAVE_PLATFORM_IMX2_WDT + depends on ARCH_MXC help This is the driver for the hardware watchdog on the Freescale IMX2 and later processors.
@@ -431,7 +443,7 @@ config ALIM7101_WDT config F71808E_WDT tristate "Fintek F71808E, F71862FG, F71869, F71882FG and F71889FG Watchdog" - depends on X86 && EXPERIMENTAL + depends on X86 help This is the driver for the hardware watchdog on the Fintek F71808E, F71862FG, F71869, F71882FG and F71889FG Super I/O controllers.
@@ -622,7 +634,7 @@ config IT8712F_WDT config IT87_WDT tristate "IT87 Watchdog Timer" - depends on X86 && EXPERIMENTAL + depends on X86 ---help--- This is the driver for the hardware watchdog on the ITE IT8702, IT8712, IT8716, IT8718, IT8720, IT8721, IT8726 and IT8728
drivers/watchdog/Makefile +1 -0
@@ -164,6 +164,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_WM831X_WATCHDOG) += wm831x_wdt.o obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o
drivers/watchdog/ath79_wdt.c +2 -11
@@ -284,6 +284,7 @@ static void ath97_wdt_shutdown(struct platform_device *pdev) }static struct platform_driver ath79_wdt_driver = { + .probe = ath79_wdt_probe, .remove = ath79_wdt_remove, .shutdown = ath97_wdt_shutdown, .driver = {
@@ -292,17 +293,7 @@ static struct platform_driver ath79_wdt_driver = { }, }; -static int __init ath79_wdt_init (void ) -{ -return platform_driver_probe (&ath79_wdt_driver, ath79_wdt_probe); -} -module_init (ath79_wdt_init); - -static void __exit ath79_wdt_exit(void) -{ -platform_driver_unregister (&ath79_wdt_driver); -} -module_exit (ath79_wdt_exit); +module_platform_driver (ath79_wdt_driver);MODULE_DESCRIPTION ("Atheros AR71XX/AR724X/AR913X hardware watchdog driver" );MODULE_AUTHOR ("Gabor Juhos <[email protected]" );
drivers/watchdog/cpu5wdt.c +1 -0
@@ -266,6 +266,7 @@ static void cpu5wdt_exit(void)if (cpu5wdt_device.queue) { cpu5wdt_device.queue =0 ;wait_for_completion (&cpu5wdt_device.stop); +del_timer (&cpu5wdt_device.timer); }misc_deregister (&cpu5wdt_misc);
drivers/watchdog/da9052_wdt.c +0 -4
@@ -53,10 +53,6 @@ static const struct {static void da9052_wdt_release_resources (struct kref *r) { -struct da9052_wdt_data *driver_data = - container_of(r, struct da9052_wdt_data, kref); - -kfree (driver_data); } static int da9052_wdt_set_timeout(struct watchdog_device *wdt_dev,
drivers/watchdog/da9055_wdt.c new file +216 -0
216 lines not on this page · raw message
drivers/watchdog/davinci_wdt.c +9 -2
@@ -208,7 +208,7 @@ static int davinci_wdt_probe(struct platform_device *pdev)if (WARN_ON (IS_ERR (wdt_clk)))return PTR_ERR (wdt_clk); -clk_enable (wdt_clk); +clk_prepare_enable (wdt_clk);if (heartbeat <1 || heartbeat >MAX_HEARTBEAT ) heartbeat =DEFAULT_HEARTBEAT ;
@@ -256,16 +256,23 @@ static int davinci_wdt_remove(struct platform_device *pdev) wdt_mem =NULL ; } -clk_disable (wdt_clk); +clk_disable_unprepare (wdt_clk);clk_put (wdt_clk);return 0 ; } +static const struct of_device_id davinci_wdt_of_match[] = { + { .compatible ="ti,davinci-wdt" , }, + {}, +}; +MODULE_DEVICE_TABLE (of, davinci_wdt_of_match); +static struct platform_driver platform_wdt_driver = { .driver = { .name ="watchdog" , .owner =THIS_MODULE , + .of_match_table = davinci_wdt_of_match, }, .probe = davinci_wdt_probe, .remove = davinci_wdt_remove,
drivers/watchdog/hpwdt.c +1 -1
@@ -39,7 +39,7 @@#endif /* CONFIG_HPWDT_NMI_DECODING */ #include <asm/nmi.h> -#define HPWDT_VERSION "1.3.0" +#define HPWDT_VERSION "1.3.1"#define SECS_TO_TICKS (secs) ((secs) * 1000 / 128)#define TICKS_TO_SECS (ticks) ((ticks) * 128 / 1000)#define HPWDT_MAX_TIMER TICKS_TO_SECS(65535)
drivers/watchdog/mpcore_wdt.c +9 -10
@@ -80,8 +80,7 @@ static irqreturn_t mpcore_wdt_fire(int irq, void *arg)/* Check it really was our interrupt */ if (readl (wdt->base +TWD_WDOG_INTSTAT )) { -dev_printk (KERN_CRIT , wdt->dev, -"Triggered - Reboot ignored.\n" ); +dev_crit (wdt->dev,"Triggered - Reboot ignored\n" );/* Clear the interrupt on the watchdog */ writel (1 , wdt->base +TWD_WDOG_INTSTAT );return IRQ_HANDLED ;
@@ -123,7 +122,7 @@ static void mpcore_wdt_stop(struct mpcore_wdt *wdt)static void mpcore_wdt_start (struct mpcore_wdt *wdt) { -dev_printk (KERN_INFO , wdt->dev,"enabling watchdog.\n" ); +dev_info (wdt->dev,"enabling watchdog\n" );/* This loads the count register but does NOT start the count yet */ mpcore_wdt_keepalive (wdt);
@@ -180,8 +179,8 @@ static int mpcore_wdt_release(struct inode *inode, struct file *file)if (wdt->expect_close ==42 )mpcore_wdt_stop (wdt);else { -dev_printk (KERN_CRIT , wdt->dev, -"unexpected close, not stopping watchdog!\n" ); +dev_crit (wdt->dev, +"unexpected close, not stopping watchdog!\n" );mpcore_wdt_keepalive (wdt); }clear_bit (0 , &wdt->timer_alive);
@@ -351,9 +350,9 @@ static int mpcore_wdt_probe(struct platform_device *pdev) ret =devm_request_irq (wdt->dev, wdt->irq, mpcore_wdt_fire,0 ,"mpcore_wdt" , wdt);if (ret) { -dev_printk (KERN_ERR , wdt->dev, -"cannot register IRQ%d for watchdog\n" , - wdt->irq); +dev_err (wdt->dev, +"cannot register IRQ%d for watchdog\n" , + wdt->irq);return ret; } }
@@ -365,9 +364,9 @@ static int mpcore_wdt_probe(struct platform_device *pdev) mpcore_wdt_miscdev.parent = &pdev->dev; ret =misc_register (&mpcore_wdt_miscdev);if (ret) { -dev_printk (KERN_ERR , wdt->dev, +dev_err (wdt->dev,"cannot register miscdev on minor=%d (err=%d)\n" , -WATCHDOG_MINOR , ret); +WATCHDOG_MINOR , ret);return ret; }
drivers/watchdog/omap_wdt.c +122 -189
459 lines not on this page · raw message
drivers/watchdog/orion_wdt.c +2 -0
@@ -156,6 +156,8 @@ static int orion_wdt_probe(struct platform_device *pdev) wdt_tclk =clk_get_rate (clk); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -ENODEV ; wdt_reg =devm_ioremap (&pdev->dev, res->start,resource_size (res));if (!wdt_reg)return -ENOMEM ;
drivers/watchdog/s3c2410_wdt.c +3 -3
@@ -354,7 +354,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) goto err_map; } -clk_enable (wdt_clock); +clk_prepare_enable (wdt_clock); ret =s3c2410wdt_cpufreq_register ();if (ret <0 ) {
@@ -421,7 +421,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)s3c2410wdt_cpufreq_deregister (); err_clk: -clk_disable (wdt_clock); +clk_disable_unprepare (wdt_clock);clk_put (wdt_clock); wdt_clock =NULL ;
@@ -445,7 +445,7 @@ static int s3c2410wdt_remove(struct platform_device *dev)s3c2410wdt_cpufreq_deregister (); -clk_disable (wdt_clock); +clk_disable_unprepare (wdt_clock);clk_put (wdt_clock); wdt_clock =NULL ;
drivers/watchdog/sp5100_tco.c +271 -50
446 lines not on this page · raw message
drivers/watchdog/sp5100_tco.h +35 -11
68 lines not on this page · raw message
drivers/watchdog/sp805_wdt.c +2 -9
@@ -130,16 +130,10 @@ static int wdt_config(struct watchdog_device *wdd, bool ping)int ret;if (!ping) { - ret =clk_prepare (wdt->clk); -if (ret) { -dev_err (&wdt->adev->dev,"clock prepare fail" ); -return ret; - } - ret =clk_enable (wdt->clk); + ret =clk_prepare_enable (wdt->clk);if (ret) {dev_err (&wdt->adev->dev,"clock enable fail" ); -clk_unprepare (wdt->clk);return ret; } }
@@ -190,8 +184,7 @@ static int wdt_disable(struct watchdog_device *wdd)readl_relaxed (wdt->base +WDTLOCK );spin_unlock (&wdt->lock); -clk_disable (wdt->clk); -clk_unprepare (wdt->clk); +clk_disable_unprepare (wdt->clk);return 0 ; }
drivers/watchdog/twl4030_wdt.c +35 -150
260 lines not on this page · raw message
include/linux/watchdog.h +1 -1
@@ -129,7 +129,7 @@ static inline void *watchdog_get_drvdata(struct watchdog_device *wdd)return wdd->driver_data; } -/* drivers/watchdog/core/watchdog_core.c */ +/* drivers/watchdog/watchdog_core.c */ extern int watchdog_register_device (struct watchdog_device *);extern void watchdog_unregister_device (struct watchdog_device *);