Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joachim Eastwood and committed by
Wim Van Sebroeck
a6a1bcd3 c1fd5f64

+19 -1
+9
Documentation/devicetree/bindings/watchdog/atmel-at91rm9200-wdt.txt
··· 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 + };
+1 -1
drivers/watchdog/Kconfig
··· 117 117 118 118 config AT91RM9200_WATCHDOG 119 119 tristate "AT91RM9200 watchdog" 120 - depends on ARCH_AT91RM9200 120 + depends on ARCH_AT91 121 121 help 122 122 Watchdog timer embedded into AT91RM9200 chips. This will reboot your 123 123 system when the timeout is reached.
+9
drivers/watchdog/at91rm9200_wdt.c
··· 24 24 #include <linux/types.h> 25 25 #include <linux/watchdog.h> 26 26 #include <linux/uaccess.h> 27 + #include <linux/of.h> 28 + #include <linux/of_device.h> 27 29 #include <mach/at91_st.h> 28 30 29 31 #define WDT_DEFAULT_TIME 5 /* seconds */ ··· 254 252 #define at91wdt_resume NULL 255 253 #endif 256 254 255 + static const struct of_device_id at91_wdt_dt_ids[] = { 256 + { .compatible = "atmel,at91rm9200-wdt" }, 257 + { /* sentinel */ } 258 + }; 259 + MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids); 260 + 257 261 static struct platform_driver at91wdt_driver = { 258 262 .probe = at91wdt_probe, 259 263 .remove = at91wdt_remove, ··· 269 261 .driver = { 270 262 .name = "at91_wdt", 271 263 .owner = THIS_MODULE, 264 + .of_match_table = of_match_ptr(at91_wdt_dt_ids), 272 265 }, 273 266 }; 274 267