|
@@ -29,6 +29,7 @@
|
|
|
#include <linux/miscdevice.h>
|
|
|
#include <linux/module.h>
|
|
|
#include <linux/moduleparam.h>
|
|
|
+#include <linux/of.h>
|
|
|
#include <linux/pm.h>
|
|
|
#include <linux/platform_device.h>
|
|
|
#include <linux/spinlock.h>
|
|
@@ -337,12 +338,21 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+#ifdef CONFIG_OF
|
|
|
+static const struct of_device_id dw_wdt_of_match[] = {
|
|
|
+ { .compatible = "snps,dw-wdt", },
|
|
|
+ { /* sentinel */ }
|
|
|
+};
|
|
|
+MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
|
|
|
+#endif
|
|
|
+
|
|
|
static struct platform_driver dw_wdt_driver = {
|
|
|
.probe = dw_wdt_drv_probe,
|
|
|
.remove = dw_wdt_drv_remove,
|
|
|
.driver = {
|
|
|
.name = "dw_wdt",
|
|
|
.owner = THIS_MODULE,
|
|
|
+ .of_match_table = of_match_ptr(dw_wdt_of_match),
|
|
|
.pm = &dw_wdt_pm_ops,
|
|
|
},
|
|
|
};
|