16350255228803f84a86ad64216539615a1d54f4
[openwrt/staging/mkresin.git] / target / linux / sunxi / patches-3.14 / 155-wdt-add-new-compats.patch
1 From ac45fe6b0056d1f92b7c7e5f13514b591a6a9caf Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Sun, 2 Feb 2014 14:55:23 +0100
4 Subject: [PATCH] wdt: sunxi: Introduce a new compatible for the A10 and A31
5
6 For historical reasons, the Allwinner A10 compatibles are not following the
7 patterns used for this other Allwinner SoCs.
8
9 Introduce a new compatible following the usual pattern, and deprecate the olders.
10
11 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
12 ---
13 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 7 ++++---
14 drivers/watchdog/sunxi_wdt.c | 1 +
15 2 files changed, 5 insertions(+), 3 deletions(-)
16
17 diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
18 index e39cb26..6e8c937 100644
19 --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
20 +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
21 @@ -2,13 +2,14 @@ Allwinner SoCs Watchdog timer
22
23 Required properties:
24
25 -- compatible : should be "allwinner,<soc-family>-wdt", the currently supported
26 - SoC families being sun4i and sun6i
27 +- compatible : should be either "allwinner,sun4i-a10-wdt" or
28 + "allwinner,sun6i-a31-wdt" (deprecated:
29 + "allwinner,sun4i-wdt", "allwinner,sun6i-wdt")
30 - reg : Specifies base physical address and size of the registers.
31
32 Example:
33
34 wdt: watchdog@01c20c90 {
35 - compatible = "allwinner,sun4i-wdt";
36 + compatible = "allwinner,sun4i-a10-wdt";
37 reg = <0x01c20c90 0x10>;
38 };
39 diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
40 index 76332d89..7c8923d 100644
41 --- a/drivers/watchdog/sunxi_wdt.c
42 +++ b/drivers/watchdog/sunxi_wdt.c
43 @@ -206,6 +206,7 @@ static void sunxi_wdt_shutdown(struct platform_device *pdev)
44
45 static const struct of_device_id sunxi_wdt_dt_ids[] = {
46 { .compatible = "allwinner,sun4i-wdt" },
47 + { .compatible = "allwinner,sun4i-a10-wdt" },
48 { /* sentinel */ }
49 };
50 MODULE_DEVICE_TABLE(of, sunxi_wdt_dt_ids);
51 --
52 2.0.3
53