aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/jz4740_wdt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
index 18e41afa4da3..4c2cc09c0c57 100644
--- a/drivers/watchdog/jz4740_wdt.c
+++ b/drivers/watchdog/jz4740_wdt.c
@@ -24,6 +24,7 @@
24#include <linux/clk.h> 24#include <linux/clk.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/of.h>
27 28
28#include <asm/mach-jz4740/timer.h> 29#include <asm/mach-jz4740/timer.h>
29 30
@@ -142,6 +143,14 @@ static const struct watchdog_ops jz4740_wdt_ops = {
142 .set_timeout = jz4740_wdt_set_timeout, 143 .set_timeout = jz4740_wdt_set_timeout,
143}; 144};
144 145
146#ifdef CONFIG_OF
147static const struct of_device_id jz4740_wdt_of_matches[] = {
148 { .compatible = "ingenic,jz4740-watchdog", },
149 { /* sentinel */ }
150};
151MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches)
152#endif
153
145static int jz4740_wdt_probe(struct platform_device *pdev) 154static int jz4740_wdt_probe(struct platform_device *pdev)
146{ 155{
147 struct jz4740_wdt_drvdata *drvdata; 156 struct jz4740_wdt_drvdata *drvdata;
@@ -211,6 +220,7 @@ static struct platform_driver jz4740_wdt_driver = {
211 .remove = jz4740_wdt_remove, 220 .remove = jz4740_wdt_remove,
212 .driver = { 221 .driver = {
213 .name = "jz4740-wdt", 222 .name = "jz4740-wdt",
223 .of_match_table = of_match_ptr(jz4740_wdt_of_matches),
214 }, 224 },
215}; 225};
216 226