diff options
author | Dinh Nguyen <dinguyen@altera.com> | 2013-10-22 12:59:12 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-11-17 13:38:26 -0500 |
commit | 58e5637333afc2bb024ff8aef212311be0614d47 (patch) | |
tree | b8bb0fa442f29015eafbd1d89b3b9b7d7350331b /drivers/watchdog/dw_wdt.c | |
parent | 487722cf2d66126338217896642bd5eec832c34b (diff) |
watchdog: dw: Enable OF support for DW watchdog timer
Add device tree support to the DW watchdog timer.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: devicetree@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
Diffstat (limited to 'drivers/watchdog/dw_wdt.c')
-rw-r--r-- | drivers/watchdog/dw_wdt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 42cfd79edf2a..a46f5c7ee7ff 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/miscdevice.h> | 29 | #include <linux/miscdevice.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/of.h> | ||
32 | #include <linux/pm.h> | 33 | #include <linux/pm.h> |
33 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
34 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
@@ -337,12 +338,21 @@ static int dw_wdt_drv_remove(struct platform_device *pdev) | |||
337 | return 0; | 338 | return 0; |
338 | } | 339 | } |
339 | 340 | ||
341 | #ifdef CONFIG_OF | ||
342 | static const struct of_device_id dw_wdt_of_match[] = { | ||
343 | { .compatible = "snps,dw-wdt", }, | ||
344 | { /* sentinel */ } | ||
345 | }; | ||
346 | MODULE_DEVICE_TABLE(of, dw_wdt_of_match); | ||
347 | #endif | ||
348 | |||
340 | static struct platform_driver dw_wdt_driver = { | 349 | static struct platform_driver dw_wdt_driver = { |
341 | .probe = dw_wdt_drv_probe, | 350 | .probe = dw_wdt_drv_probe, |
342 | .remove = dw_wdt_drv_remove, | 351 | .remove = dw_wdt_drv_remove, |
343 | .driver = { | 352 | .driver = { |
344 | .name = "dw_wdt", | 353 | .name = "dw_wdt", |
345 | .owner = THIS_MODULE, | 354 | .owner = THIS_MODULE, |
355 | .of_match_table = of_match_ptr(dw_wdt_of_match), | ||
346 | .pm = &dw_wdt_pm_ops, | 356 | .pm = &dw_wdt_pm_ops, |
347 | }, | 357 | }, |
348 | }; | 358 | }; |