diff options
-rw-r--r-- | Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt | 9 | ||||
-rw-r--r-- | drivers/watchdog/Kconfig | 2 | ||||
-rw-r--r-- | drivers/watchdog/at91rm9200_wdt.c | 9 |
3 files changed, 19 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt new file mode 100644 index 000000000000..d4d86cf8f9eb --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt | |||
@@ -0,0 +1,9 @@ | |||
1 | Atmel AT91RM9200 System Timer Watchdog | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "atmel,at91sam9260-wdt". | ||
5 | |||
6 | Example: | ||
7 | watchdog@fffffd00 { | ||
8 | compatible = "atmel,at91rm9200-wdt"; | ||
9 | }; | ||
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 | ||