From: Heiko Stuebner <heiko@...>
Date: Wed, 26 Jun 2013 19:47:25 +0200
Commit-Message
The dw_wdt does not use any platform-specific data, so no new properties
need to be introduced. The dw-apb-wdt naming follows other designware
components in the kernel and is also written like this in documentation
describing the component.
Signed-off-by: Heiko Stuebner <heiko@...>
Patch-Comment
DT binding patch from another dev made it in, so this one is obsolete
.../devicetree/bindings/watchdog/snps-dw-apb-wdt.txt | 18 ++++++++++++++++++
drivers/watchdog/dw_wdt.c | 10 ++++++++++
2 files changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/snps-dw-apb-wdt.txt
Statistics
- 28 lines added
- 0 lines removed
Changes
@@ -0,0 +1,18 @@
+* Synosis DesignWare APB Watchdog
+
+The Watchdog controller is used for resuming system operation
+after a preset amount of time during which the WDT reset event has not
+occurred.
+
+Required properties:
+- compatible : "snps,dw-apb-wdt"
+- reg : offset and length of the register set for the device.
+- clocks : the periphal clock of the controller.
+
+Example:
+
+ watchdog@2004c000 {
+ compatible = "snps,dw-apb-wdt";
+ reg = <0x2004c000 0x100>;
+ clocks = <&wdt_clock>;
+ };
@@ -35,6 +35,7 @@
#include <linux/timer.h>
#include <linux/uaccess.h>
#include <linux/watchdog.h>
+#include <linux/of.h>
#define WDOG_CONTROL_REG_OFFSET 0x00
#define WDOG_CONTROL_REG_WDT_EN_MASK 0x01
@@ -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-apb-wdt", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, dw_i2c_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,
},
};