]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
watchdog: at91rm9200: add DT support
authorJoachim Eastwood <manabian@gmail.com>
Thu, 14 Feb 2013 22:02:29 +0000 (23:02 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 19 Feb 2013 19:22:53 +0000 (20:22 +0100)
Add DT support for at91rm9200_wdt.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt [new file with mode: 0644]
drivers/watchdog/Kconfig
drivers/watchdog/at91rm9200_wdt.c

diff --git a/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt
new file mode 100644 (file)
index 0000000..d4d86cf
--- /dev/null
@@ -0,0 +1,9 @@
+Atmel AT91RM9200 System Timer Watchdog
+
+Required properties:
+- compatible: must be "atmel,at91sam9260-wdt".
+
+Example:
+       watchdog@fffffd00 {
+               compatible = "atmel,at91rm9200-wdt";
+       };
index c36fcb0240dc7165b2f63a6c328c9b2e8264d65d..22cd5c9e81ea4237c3dffd41a363a7ba8cec2926 100644 (file)
@@ -117,7 +117,7 @@ config ARM_SP805_WATCHDOG
 
 config AT91RM9200_WATCHDOG
        tristate "AT91RM9200 watchdog"
-       depends on ARCH_AT91RM9200
+       depends on ARCH_AT91
        help
          Watchdog timer embedded into AT91RM9200 chips. This will reboot your
          system when the timeout is reached.
index 89831ed24a4ff7378a9ba356ec97d8c56f95d846..1c75260b987c13dcd58ef1137c08ac5386709b0a 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/types.h>
 #include <linux/watchdog.h>
 #include <linux/uaccess.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 #include <mach/at91_st.h>
 
 #define WDT_DEFAULT_TIME       5       /* seconds */
@@ -252,6 +254,12 @@ static int at91wdt_resume(struct platform_device *pdev)
 #define at91wdt_resume NULL
 #endif
 
+static const struct of_device_id at91_wdt_dt_ids[] = {
+       { .compatible = "atmel,at91rm9200-wdt" },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids);
+
 static struct platform_driver at91wdt_driver = {
        .probe          = at91wdt_probe,
        .remove         = at91wdt_remove,
@@ -261,6 +269,7 @@ static struct platform_driver at91wdt_driver = {
        .driver         = {
                .name   = "at91_wdt",
                .owner  = THIS_MODULE,
+               .of_match_table = of_match_ptr(at91_wdt_dt_ids),
        },
 };