diff options
| author | Joachim Eastwood <manabian@gmail.com> | 2013-02-14 17:02:29 -0500 |
|---|---|---|
| committer | Wim Van Sebroeck <wim@iguana.be> | 2013-03-01 06:55:27 -0500 |
| commit | a6a1bcd3700a792d89999a7ec89a9303534ccefc (patch) | |
| tree | 438ef63654764808501bcd3d9c1f709d33ac8a9c /drivers | |
| parent | c1fd5f6402050b2463d0610b94f050fedf1b5019 (diff) | |
watchdog: at91rm9200: add DT support
Add DT support for at91rm9200_wdt.
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/watchdog/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/watchdog/at91rm9200_wdt.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 83ac1f7ac32c..0374e0edb923 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -117,7 +117,7 @@ config ARM_SP805_WATCHDOG | |||
| 117 | 117 | ||
| 118 | config AT91RM9200_WATCHDOG | 118 | config AT91RM9200_WATCHDOG |
| 119 | tristate "AT91RM9200 watchdog" | 119 | tristate "AT91RM9200 watchdog" |
| 120 | depends on ARCH_AT91RM9200 | 120 | depends on ARCH_AT91 |
| 121 | help | 121 | help |
| 122 | Watchdog timer embedded into AT91RM9200 chips. This will reboot your | 122 | Watchdog timer embedded into AT91RM9200 chips. This will reboot your |
| 123 | system when the timeout is reached. | 123 | system when the timeout is reached. |
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 89831ed24a4f..1c75260b987c 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/watchdog.h> | 25 | #include <linux/watchdog.h> |
| 26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
| 27 | #include <linux/of.h> | ||
| 28 | #include <linux/of_device.h> | ||
| 27 | #include <mach/at91_st.h> | 29 | #include <mach/at91_st.h> |
| 28 | 30 | ||
| 29 | #define WDT_DEFAULT_TIME 5 /* seconds */ | 31 | #define WDT_DEFAULT_TIME 5 /* seconds */ |
| @@ -252,6 +254,12 @@ static int at91wdt_resume(struct platform_device *pdev) | |||
| 252 | #define at91wdt_resume NULL | 254 | #define at91wdt_resume NULL |
| 253 | #endif | 255 | #endif |
| 254 | 256 | ||
| 257 | static const struct of_device_id at91_wdt_dt_ids[] = { | ||
| 258 | { .compatible = "atmel,at91rm9200-wdt" }, | ||
| 259 | { /* sentinel */ } | ||
| 260 | }; | ||
| 261 | MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids); | ||
| 262 | |||
| 255 | static struct platform_driver at91wdt_driver = { | 263 | static struct platform_driver at91wdt_driver = { |
| 256 | .probe = at91wdt_probe, | 264 | .probe = at91wdt_probe, |
| 257 | .remove = at91wdt_remove, | 265 | .remove = at91wdt_remove, |
| @@ -261,6 +269,7 @@ static struct platform_driver at91wdt_driver = { | |||
| 261 | .driver = { | 269 | .driver = { |
| 262 | .name = "at91_wdt", | 270 | .name = "at91_wdt", |
| 263 | .owner = THIS_MODULE, | 271 | .owner = THIS_MODULE, |
| 272 | .of_match_table = of_match_ptr(at91_wdt_dt_ids), | ||
| 264 | }, | 273 | }, |
| 265 | }; | 274 | }; |
| 266 | 275 | ||
