diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 13:03:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-28 13:03:26 -0700 |
commit | 750f77064a290beb162352077b52c61b04bcae0e (patch) | |
tree | 736a8dd043dc4cda298762a80e7c1fbf1bb87742 /drivers/watchdog/of_xilinx_wdt.c | |
parent | 89e5d6f0d979f6e7dc2bbb1ebd9e239217e2e952 (diff) | |
parent | b92c803ec61de59e6e4ab9b2748d8e633cec3f08 (diff) | |
download | kernel_goldelico_gta04-750f77064a290beb162352077b52c61b04bcae0e.zip kernel_goldelico_gta04-750f77064a290beb162352077b52c61b04bcae0e.tar.gz kernel_goldelico_gta04-750f77064a290beb162352077b52c61b04bcae0e.tar.bz2 |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
- Removal of the Documentation/watchdog/00-INDEX file
- Fix boot status reporting for imx2_wdt
- clean-up sp805_wdt, pnx4008_wdt and mpcore_wdt
- convert printk in watchdog drivers to pr_ functions
- change nowayout module parameter to bool for every watchdog device
- conversion of jz4740_wdt, pnx4008_wdt, max63xx_wdt, softdog,
ep93xx_wdt, coh901327 and txx9wdt to new watchdog API
- Add support for the WDIOC_GETTIMELEFT ioctl call to the new watchdog
API
- Change the new watchdog API so that the driver updates the timeout
value
- two fixes for the xen_wdt driver
Fix up conflicts in ep93xx driver due to the same patches being merged
through separate branches.
* git://www.linux-watchdog.org/linux-watchdog: (33 commits)
watchdog: txx9wdt: fix timeout
watchdog: Convert txx9wdt driver to watchdog framework
watchdog: coh901327_wdt.c: fix timeout
watchdog: coh901327: convert to use watchdog core
watchdog: Add support for WDIOC_GETTIMELEFT IOCTL in watchdog core
watchdog: ep93xx_wdt: timeout is an unsigned int value.
watchdog: ep93xx_wdt: Fix timeout after conversion to watchdog core
watchdog: Convert ep93xx driver to watchdog core
watchdog: sp805: Use devm routines
watchdog: sp805: replace readl/writel with lighter _relaxed variants
watchdog: sp805: Fix documentation style comment
watchdog: mpcore_wdt: Allow platform_get_irq() to fail
watchdog: mpcore_wdt: Use devm routines
watchdog: mpcore_wdt: Rename dev to pdev for pointing to struct platform_device
watchdog: xen: don't clear is_active when xen_wdt_stop() failed
watchdog: xen: don't unconditionally enable the watchdog during resume
watchdog: fix compiler error for missing parenthesis
watchdog: ep93xx_wdt.c: fix platform probe
watchdog: ep93xx: Convert the watchdog driver into a platform device.
watchdog: fix set_timeout operations
...
Diffstat (limited to 'drivers/watchdog/of_xilinx_wdt.c')
-rw-r--r-- | drivers/watchdog/of_xilinx_wdt.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index f359ab8..55d2f66 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -19,6 +19,8 @@ * know the wdt reset interval */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> @@ -99,7 +101,7 @@ static void xwdt_stop(void) iowrite32(0, xdev.base + XWT_TWCSR1_OFFSET); spin_unlock(&spinlock); - printk(KERN_INFO PFX "Stopped!\n"); + pr_info("Stopped!\n"); } static void xwdt_keepalive(void) @@ -165,7 +167,7 @@ static int xwdt_open(struct inode *inode, struct file *file) __module_get(THIS_MODULE); xwdt_start(); - printk(KERN_INFO PFX "Started...\n"); + pr_info("Started...\n"); return nonseekable_open(inode, file); } @@ -175,8 +177,7 @@ static int xwdt_release(struct inode *inode, struct file *file) if (expect_close == 42) { xwdt_stop(); } else { - printk(KERN_CRIT PFX - "Unexpected close, not stopping watchdog!\n"); + pr_crit("Unexpected close, not stopping watchdog!\n"); xwdt_keepalive(); } @@ -300,22 +301,20 @@ static int __devinit xwdt_probe(struct platform_device *pdev) "clock-frequency", NULL); if (pfreq == NULL) { - printk(KERN_WARNING PFX - "The watchdog clock frequency cannot be obtained!\n"); + pr_warn("The watchdog clock frequency cannot be obtained!\n"); no_timeout = 1; } rc = of_address_to_resource(pdev->dev.of_node, 0, &xdev.res); if (rc) { - printk(KERN_WARNING PFX "invalid address!\n"); + pr_warn("invalid address!\n"); return rc; } tmptr = (u32 *)of_get_property(pdev->dev.of_node, "xlnx,wdt-interval", NULL); if (tmptr == NULL) { - printk(KERN_WARNING PFX "Parameter \"xlnx,wdt-interval\"" - " not found in device tree!\n"); + pr_warn("Parameter \"xlnx,wdt-interval\" not found in device tree!\n"); no_timeout = 1; } else { xdev.wdt_interval = *tmptr; @@ -324,8 +323,7 @@ static int __devinit xwdt_probe(struct platform_device *pdev) tmptr = (u32 *)of_get_property(pdev->dev.of_node, "xlnx,wdt-enable-once", NULL); if (tmptr == NULL) { - printk(KERN_WARNING PFX "Parameter \"xlnx,wdt-enable-once\"" - " not found in device tree!\n"); + pr_warn("Parameter \"xlnx,wdt-enable-once\" not found in device tree!\n"); xdev.nowayout = WATCHDOG_NOWAYOUT; } @@ -339,20 +337,20 @@ static int __devinit xwdt_probe(struct platform_device *pdev) if (!request_mem_region(xdev.res.start, xdev.res.end - xdev.res.start + 1, WATCHDOG_NAME)) { rc = -ENXIO; - printk(KERN_ERR PFX "memory request failure!\n"); + pr_err("memory request failure!\n"); goto err_out; } xdev.base = ioremap(xdev.res.start, xdev.res.end - xdev.res.start + 1); if (xdev.base == NULL) { rc = -ENOMEM; - printk(KERN_ERR PFX "ioremap failure!\n"); + pr_err("ioremap failure!\n"); goto release_mem; } rc = xwdt_selftest(); if (rc == XWT_TIMER_FAILED) { - printk(KERN_ERR PFX "SelfTest routine error!\n"); + pr_err("SelfTest routine error!\n"); goto unmap_io; } @@ -360,20 +358,17 @@ static int __devinit xwdt_probe(struct platform_device *pdev) rc = misc_register(&xwdt_miscdev); if (rc) { - printk(KERN_ERR PFX - "cannot register miscdev on minor=%d (err=%d)\n", - xwdt_miscdev.minor, rc); + pr_err("cannot register miscdev on minor=%d (err=%d)\n", + xwdt_miscdev.minor, rc); goto unmap_io; } if (no_timeout) - printk(KERN_INFO PFX - "driver loaded (timeout=? sec, nowayout=%d)\n", - xdev.nowayout); + pr_info("driver loaded (timeout=? sec, nowayout=%d)\n", + xdev.nowayout); else - printk(KERN_INFO PFX - "driver loaded (timeout=%d sec, nowayout=%d)\n", - timeout, xdev.nowayout); + pr_info("driver loaded (timeout=%d sec, nowayout=%d)\n", + timeout, xdev.nowayout); expect_close = 0; clear_bit(0, &driver_open); |