watchdog - v3.11-rc1 patches
Hi Linus,
Please pull from 'master' branch of
git://www.linux-watchdog.org/linux-watchdog.git
This contains:
* New watchdog driver for Allwinner A10/A13
* some devm_ioremap_resource simplifications
* a s3c2410_wdt change that removes the global variables
This will update the following files:
Kconfig | 10 ++ Makefile | 1 ar7_wdt.c | 5 - nuc900_wdt.c | 5 - s3c2410_wdt.c | 228 +++++++++++++++++++++++++++++++------------------------ sunxi_wdt.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ts72xx_wdt.c | 10 -- 7 files changed, 377 insertions(+), 119 deletions(-)
with these Changes:
commit bd5cc119ef6bbe8ad64a303542c436c7a82498b7
Author: Julia Lawall <[email protected]> Date: Wed Aug 14 11:11:24 2013 +0200
watchdog: s3c2410_wdt: simplify use of devm_ioremap_resource
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource.
Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res);
// </smpl>
commit 8ecc7d2b2207ed9642e3d0140bfaa8c93a6ea47f
Author: Julia Lawall <[email protected]> Date: Mon Aug 19 10:51:52 2013 +0200
watchdog: simplify platform_get_resource_byname/devm_ioremap_resource
Remove unneeded error handling on the result of a call to
platform_get_resource_byname when the value is passed to devm_ioremap_resource.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,e,e1;
expression ret != 0;
identifier l;
@@
res = platform_get_resource_byname(...);
- if (res == NULL) { ... \(goto l;\|return ret;\) }
e = devm_ioremap_resource(e1, res);
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>commit 086f2d500c693e2d175fe06c9dbfde1c69a26644
Author: Julia Lawall <[email protected]> Date: Wed Aug 14 11:11:23 2013 +0200
watchdog: ts72xx_wdt: simplify use of devm_ioremap_resource
Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
e = devm_ioremap_resource(e1, res);
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>commit 9aebc962767194c330868f53e293d4179919912c
Author: Julia Lawall <[email protected]> Date: Wed Aug 14 11:11:14 2013 +0200
watchdog: nuc900_wdt.c: simplify use of devm_ioremap_resource
Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res);
// </smpl>
commit d00680ed002649c8d06237a0abefcd89211757fd
Author: Carlo Caione <[email protected]> Date: Tue Jul 30 21:20:46 2013 +0200
watchdog: sunxi: New watchdog driver for Allwinner A10/A13
This patch adds the driver for the watchdog found in the Allwinner A10 and A13 SoCs. It has DT-support and uses the new watchdog framework.
commit af4ea6312cebd756221b813b0b69bca9b201a6af
Author: Leela Krishna Amudala <[email protected]> Date: Tue Aug 27 15:36:03 2013 +0530
watchdog: s3c2410_wdt: remove the global variables
This patch removes the global variables in the driver file and group them into a structure.
For completeness, I added the overal diff below.
Greetings,
Wim.
================================================================================
drivers/watchdog/Kconfig +10 -0
@@ -290,6 +290,16 @@ config ORION_WATCHDOG To compile this driver as a module, choose M here: the module will be called orion_wdt. +config SUNXI_WATCHDOG + tristate "Allwinner SoCs watchdog support" + depends on ARCH_SUNXI + select WATCHDOG_CORE + help + Say Y here to include support for the watchdog timer + in Allwinner SoCs. + To compile this driver as a module, choose M here: the + module will be called sunxi_wdt. + config COH901327_WATCHDOG bool "ST-Ericsson COH 901 327 watchdog" depends on ARCH_U300
drivers/watchdog/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o obj-$(CONFIG_DAVINCI_WATCHDOG) += davinci_wdt.o obj-$(CONFIG_ORION_WATCHDOG) += orion_wdt.o +obj-$(CONFIG_SUNXI_WATCHDOG) += sunxi_wdt.o obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o obj-$(CONFIG_STMP3XXX_RTC_WATCHDOG) += stmp3xxx_rtc_wdt.o obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o
drivers/watchdog/ar7_wdt.c +0 -5
@@ -280,11 +280,6 @@ static int ar7_wdt_probe(struct platform_device *pdev) ar7_regs_wdt =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"regs" ); -if (!ar7_regs_wdt) { -pr_err ("could not get registers resource\n" ); -return -ENODEV ; - } - ar7_wdt =devm_ioremap_resource (&pdev->dev, ar7_regs_wdt);if (IS_ERR (ar7_wdt))return PTR_ERR (ar7_wdt);
drivers/watchdog/nuc900_wdt.c +0 -5
@@ -256,11 +256,6 @@ static int nuc900wdt_probe(struct platform_device *pdev)spin_lock_init (&nuc900_wdt->wdt_lock); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -if (res ==NULL ) { -dev_err (&pdev->dev,"no memory resource specified\n" ); -return -ENOENT ; - } - nuc900_wdt->wdt_base =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (nuc900_wdt->wdt_base))return PTR_ERR (nuc900_wdt->wdt_base);
drivers/watchdog/s3c2410_wdt.c +129 -99
444 lines not on this page · raw message
drivers/watchdog/sunxi_wdt.c new file +237 -0
237 lines not on this page · raw message
drivers/watchdog/ts72xx_wdt.c +0 -10
@@ -403,21 +403,11 @@ static int ts72xx_wdt_probe(struct platform_device *pdev) } r1 =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -if (!r1) { -dev_err (&pdev->dev,"failed to get memory resource\n" ); -return -ENODEV ; - } - wdt->control_reg =devm_ioremap_resource (&pdev->dev, r1);if (IS_ERR (wdt->control_reg))return PTR_ERR (wdt->control_reg); r2 =platform_get_resource (pdev,IORESOURCE_MEM ,1 ); -if (!r2) { -dev_err (&pdev->dev,"failed to get memory resource\n" ); -return -ENODEV ; - } - wdt->feed_reg =devm_ioremap_resource (&pdev->dev, r2);if (IS_ERR (wdt->feed_reg))return PTR_ERR (wdt->feed_reg);