devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/4] Add watchdog DT nodes and parse it to read PMU registers addresses
@ 2013-09-27 10:16 Leela Krishna Amudala
  2013-09-27 10:16 ` [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420 Leela Krishna Amudala
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Leela Krishna Amudala @ 2013-09-27 10:16 UTC (permalink / raw)
  To: linux-samsung-soc, wim, kgene.kim
  Cc: devicetree, t.figa, dianders, linux-watchdog

This patchset does the following things
	- Fixes the watchdog DT node name to follow convention
	- Adds watchdog DT node to Exynos5420 SoC
	- parse the watchdog device node to read pmu wdt sys registers
	  addresses and do mask/unmask enable/disable of WDT in probe
	  and s2r scenarios.

This patch set is rebased on Kgene's for-next branch and tested on SMDK5420

Changes since V1:
	- Added new compatible string for Exynos5 SoCs
	- Introduced quirk mechanism to program PMU registers
	- Addressed comments given by Tomasz Figa <t.figa@samsung.com>

Leela Krishna Amudala (4):
  ARM: dts: Fix the watchdog DT node name for Exynos5
  ARM: dts: add watchdog device tree node for exynos5420
  watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers
    adresses
  ARM: dts: exynos: add PMU registers addresses and mask bit to
    watchdog node

 .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
 arch/arm/boot/dts/exynos5.dtsi                     |    6 +-
 arch/arm/boot/dts/exynos5250.dtsi                  |    4 +-
 arch/arm/boot/dts/exynos5420.dtsi                  |    7 ++
 drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
 5 files changed, 121 insertions(+), 14 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH V2 1/4] ARM: dts: Fix the watchdog DT node name for Exynos5
       [not found] ` <1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-09-27 10:16   ` Leela Krishna Amudala
       [not found]     ` <1380276986-24131-2-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-09-27 10:16   ` [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node Leela Krishna Amudala
  1 sibling, 1 reply; 9+ messages in thread
From: Leela Krishna Amudala @ 2013-09-27 10:16 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	wim-IQzOog9fTRqzQB+pC5nmwQ, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, t.figa-Sze3O3UU22JBDgjK7y7TUQ,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA

Fixes the watchdog DT node name for Exynos5 as per the DT node naming
convention also update "status" property for Exynos5250 SoC.

Signed-off-by: Leela Krishna Amudala <l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/boot/dts/exynos5.dtsi    |    2 +-
 arch/arm/boot/dts/exynos5250.dtsi |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index 074739d..a8bf0c2 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -102,7 +102,7 @@
 		status = "disabled";
 	};
 
-	watchdog {
+	watchdog@101D0000 {
 		compatible = "samsung,s3c2410-wdt";
 		reg = <0x101D0000 0x100>;
 		interrupts = <0 42 0>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 7d7cc77..6bb42cf 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -158,9 +158,10 @@
 		interrupts = <0 47 0>;
 	};
 
-	watchdog {
+	watchdog@101D0000 {
 		clocks = <&clock 336>;
 		clock-names = "watchdog";
+		status = "okay";
 	};
 
 	g2d@10850000 {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420
  2013-09-27 10:16 [PATCH V2 0/4] Add watchdog DT nodes and parse it to read PMU registers addresses Leela Krishna Amudala
@ 2013-09-27 10:16 ` Leela Krishna Amudala
  2013-09-27 21:07   ` Doug Anderson
  2013-09-27 10:16 ` [PATCH V2 3/4] watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses Leela Krishna Amudala
       [not found] ` <1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Leela Krishna Amudala @ 2013-09-27 10:16 UTC (permalink / raw)
  To: linux-samsung-soc, wim, kgene.kim
  Cc: devicetree, t.figa, dianders, linux-watchdog

Add watchdog device tree node for exynos5420

Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
---
 arch/arm/boot/dts/exynos5420.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index d537cd7..9fadc23 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -186,6 +186,12 @@
 		status = "okay";
 	};
 
+	watchdog@101D0000 {
+		clocks = <&clock 316>;
+		clock-names = "watchdog";
+		status = "okay";
+	};
+
 	serial@12C00000 {
 		clocks = <&clock 257>, <&clock 128>;
 		clock-names = "uart", "clk_uart_baud0";
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V2 3/4] watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses
  2013-09-27 10:16 [PATCH V2 0/4] Add watchdog DT nodes and parse it to read PMU registers addresses Leela Krishna Amudala
  2013-09-27 10:16 ` [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420 Leela Krishna Amudala
@ 2013-09-27 10:16 ` Leela Krishna Amudala
       [not found]   ` <1380276986-24131-4-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
       [not found] ` <1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Leela Krishna Amudala @ 2013-09-27 10:16 UTC (permalink / raw)
  To: linux-samsung-soc, wim, kgene.kim
  Cc: devicetree, t.figa, dianders, linux-watchdog

This patch parses the watchdog node to read pmu wdt sys registers addresses
and do mask/unmask enable/disable of WDT in probe and s2r scenarios.

Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
---
 .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
 drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
 2 files changed, 108 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
index 2aa486c..f78b802 100644
--- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
@@ -5,10 +5,30 @@ after a preset amount of time during which the WDT reset event has not
 occurred.
 
 Required properties:
-- compatible : should be "samsung,s3c2410-wdt"
+- compatible : should be "samsung,s3c2410-wdt" or "samsung,s3c5250-wdt"
 - reg : base physical address of the controller and length of memory mapped
-	region.
+	region and additional (addresses and length of memory mapped regions
+	of) PMU registers for masking/unmasking WDT only in case of Exynos5250 and 5420.
 - interrupts : interrupt number to the cpu.
+- reset-mask-bit: bit number in the PMU registers to program mask/unmask WDT (required only
+	in case	of Exynos5250 and 5420).
 
 Optional properties:
 - timeout-sec : contains the watchdog timeout in seconds.
+
+Examples:
+
+watchdog {
+	compatible = "samsung,s3c2410-wdt";
+	reg = <0x101D0000 0x100>;
+	interrupts = <0 42 0>;
+	status = "disabled";
+};
+
+watchdog {
+        compatible = "samsung,s3c5250-wdt";
+        reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;
+        interrupts = <0 42 0>;
+        status = "disabled";
+        reset-mask-bit = <0>;
+};
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 23aad7c..89eabca 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -61,6 +61,8 @@
 #define CONFIG_S3C2410_WATCHDOG_ATBOOT		(0)
 #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME	(15)
 
+#define QUIRK_NEEDS_PMU_CONFIG	(1 << 0)
+
 static bool nowayout	= WATCHDOG_NOWAYOUT;
 static int tmr_margin;
 static int tmr_atboot	= CONFIG_S3C2410_WATCHDOG_ATBOOT;
@@ -94,7 +96,21 @@ struct s3c2410_wdt {
 	unsigned long		wtdat_save;
 	struct watchdog_device	wdt_device;
 	struct notifier_block	freq_transition;
+	void __iomem		*pmu_disable_reg;
+	void __iomem		*pmu_mask_reset_reg;
+	int			pmu_mask_bit;
+	unsigned int		quirks;
+};
+
+#ifdef CONFIG_OF
+static const struct of_device_id s3c2410_wdt_match[] = {
+	{ .compatible = "samsung,s3c2410-wdt" },
+	{ .compatible = "samsung,s3c5250-wdt",
+	  .data	= (void *) QUIRK_NEEDS_PMU_CONFIG },
+	{},
 };
+MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
+#endif
 
 /* watchdog control routines */
 
@@ -111,6 +127,25 @@ static inline struct s3c2410_wdt *freq_to_wdt(struct notifier_block *nb)
 	return container_of(nb, struct s3c2410_wdt, freq_transition);
 }
 
+static void s3c2410wdt_mask_and_disable_reset(int mask, struct s3c2410_wdt *wdt)
+{
+	unsigned int disable, mask_reset;
+
+	disable = readl(wdt->pmu_disable_reg);
+	mask_reset = readl(wdt->pmu_mask_reset_reg);
+
+	if (mask) {
+		disable |= (1 << wdt->pmu_mask_bit);
+		mask_reset |= (1 << wdt->pmu_mask_bit);
+	} else {
+		disable &= ~(1 << wdt->pmu_mask_bit);
+		mask_reset &= ~(1 << wdt->pmu_mask_bit);
+	}
+
+	writel(disable, wdt->pmu_disable_reg);
+	writel(mask_reset, wdt->pmu_mask_reset_reg);
+}
+
 static int s3c2410wdt_keepalive(struct watchdog_device *wdd)
 {
 	struct s3c2410_wdt *wdt = watchdog_get_drvdata(wdd);
@@ -332,6 +367,14 @@ static inline void s3c2410wdt_cpufreq_deregister(struct s3c2410_wdt *wdt)
 }
 #endif
 
+/* s3c2410_get_wdt_quirks */
+static inline unsigned int s3c2410_get_wdt_quirks(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+	match = of_match_node(s3c2410_wdt_match, pdev->dev.of_node);
+	return (unsigned int)match->data;
+}
+
 static int s3c2410wdt_probe(struct platform_device *pdev)
 {
 	struct device *dev;
@@ -341,6 +384,8 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 	unsigned int wtcon;
 	int started = 0;
 	int ret;
+	struct resource *res;
+	unsigned int mask_bit;
 
 	DBG("%s: probe=%p\n", __func__, pdev);
 
@@ -369,6 +414,37 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 		goto err;
 	}
 
+	wdt->quirks = s3c2410_get_wdt_quirks(pdev);
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG) {
+		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+		wdt->pmu_disable_reg = devm_ioremap_resource(&pdev->dev, res);
+
+		if (IS_ERR(wdt->pmu_disable_reg)) {
+			dev_err(dev, "failed to find PMU disable register\n");
+			ret = PTR_ERR(wdt->pmu_disable_reg);
+			goto err;
+		}
+
+		res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
+		wdt->pmu_mask_reset_reg = devm_ioremap_resource(&pdev->dev,
+									res);
+
+		if (IS_ERR(wdt->pmu_mask_reset_reg)) {
+			dev_err(dev, "failed to find PMU mask reset register\n");
+			ret = PTR_ERR(wdt->pmu_mask_reset_reg);
+			goto err;
+		}
+
+		if (of_property_read_u32(pdev->dev.of_node, "reset-mask-bit",
+								&mask_bit)) {
+			dev_err(dev, "reset-mask-bit not specified\n");
+			ret = -EINVAL;
+			goto err;
+		} else {
+			wdt->pmu_mask_bit = mask_bit;
+		}
+	}
+
 	DBG("probe: mapped reg_base=%p\n", wdt->reg_base);
 
 	wdt->clock = devm_clk_get(dev, "watchdog");
@@ -444,6 +520,8 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
 		 (wtcon & S3C2410_WTCON_RSTEN) ? "en" : "dis",
 		 (wtcon & S3C2410_WTCON_INTEN) ? "en" : "dis");
 
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG)
+		s3c2410wdt_mask_and_disable_reset(0, wdt);
 	return 0;
 
  err_cpufreq:
@@ -461,6 +539,8 @@ static int s3c2410wdt_remove(struct platform_device *dev)
 {
 	struct s3c2410_wdt *wdt = platform_get_drvdata(dev);
 
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG)
+		s3c2410wdt_mask_and_disable_reset(1, wdt);
 	watchdog_unregister_device(&wdt->wdt_device);
 
 	s3c2410wdt_cpufreq_deregister(wdt);
@@ -475,6 +555,8 @@ static void s3c2410wdt_shutdown(struct platform_device *dev)
 {
 	struct s3c2410_wdt *wdt = platform_get_drvdata(dev);
 
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG)
+		s3c2410wdt_mask_and_disable_reset(1, wdt);
 	s3c2410wdt_stop(&wdt->wdt_device);
 }
 
@@ -488,6 +570,8 @@ static int s3c2410wdt_suspend(struct device *dev)
 	wdt->wtcon_save = readl(wdt->reg_base + S3C2410_WTCON);
 	wdt->wtdat_save = readl(wdt->reg_base + S3C2410_WTDAT);
 
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG)
+		s3c2410wdt_mask_and_disable_reset(1, wdt);
 	/* Note that WTCNT doesn't need to be saved. */
 	s3c2410wdt_stop(&wdt->wdt_device);
 
@@ -503,6 +587,8 @@ static int s3c2410wdt_resume(struct device *dev)
 	writel(wdt->wtdat_save, wdt->reg_base + S3C2410_WTCNT);/* Reset count */
 	writel(wdt->wtcon_save, wdt->reg_base + S3C2410_WTCON);
 
+	if (wdt->quirks & QUIRK_NEEDS_PMU_CONFIG)
+		s3c2410wdt_mask_and_disable_reset(0, wdt);
 	dev_info(dev, "watchdog %sabled\n",
 		(wdt->wtcon_save & S3C2410_WTCON_ENABLE) ? "en" : "dis");
 
@@ -513,14 +599,6 @@ static int s3c2410wdt_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(s3c2410wdt_pm_ops, s3c2410wdt_suspend,
 			s3c2410wdt_resume);
 
-#ifdef CONFIG_OF
-static const struct of_device_id s3c2410_wdt_match[] = {
-	{ .compatible = "samsung,s3c2410-wdt" },
-	{},
-};
-MODULE_DEVICE_TABLE(of, s3c2410_wdt_match);
-#endif
-
 static struct platform_driver s3c2410wdt_driver = {
 	.probe		= s3c2410wdt_probe,
 	.remove		= s3c2410wdt_remove,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node
       [not found] ` <1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-09-27 10:16   ` [PATCH V2 1/4] ARM: dts: Fix the watchdog DT node name for Exynos5 Leela Krishna Amudala
@ 2013-09-27 10:16   ` Leela Krishna Amudala
  2013-09-27 16:47     ` Sachin Kamat
  1 sibling, 1 reply; 9+ messages in thread
From: Leela Krishna Amudala @ 2013-09-27 10:16 UTC (permalink / raw)
  To: linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	wim-IQzOog9fTRqzQB+pC5nmwQ, kgene.kim-Sze3O3UU22JBDgjK7y7TUQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, t.figa-Sze3O3UU22JBDgjK7y7TUQ,
	dianders-F7+t8E8rja9g9hUCZPvPmw,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA

This patch adds support for specifying the pmu registers and masking bit
for watchdog to enable/disable and mask/unmask the watchdog reset request.

Signed-off-by: Leela Krishna Amudala <l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm/boot/dts/exynos5.dtsi    |    4 ++--
 arch/arm/boot/dts/exynos5250.dtsi |    1 +
 arch/arm/boot/dts/exynos5420.dtsi |    1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index a8bf0c2..764c290 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -103,8 +103,8 @@
 	};
 
 	watchdog@101D0000 {
-		compatible = "samsung,s3c2410-wdt";
-		reg = <0x101D0000 0x100>;
+		compatible = "samsung,s3c5250-wdt";
+		reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;
 		interrupts = <0 42 0>;
 		status = "disabled";
 	};
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 6bb42cf..8bf28a7a 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -161,6 +161,7 @@
 	watchdog@101D0000 {
 		clocks = <&clock 336>;
 		clock-names = "watchdog";
+		reset-mask-bit = <20>;
 		status = "okay";
 	};
 
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 9fadc23..29235ea 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -189,6 +189,7 @@
 	watchdog@101D0000 {
 		clocks = <&clock 316>;
 		clock-names = "watchdog";
+		reset-mask-bit = <0>;
 		status = "okay";
 	};
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node
  2013-09-27 10:16   ` [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node Leela Krishna Amudala
@ 2013-09-27 16:47     ` Sachin Kamat
  0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-09-27 16:47 UTC (permalink / raw)
  To: Leela Krishna Amudala
  Cc: linux-samsung-soc, Wim Van Sebroeck, Kukjin Kim, devicetree,
	Tomasz Figa, Douglas Anderson, linux-watchdog

Hi Leela,

On 27 September 2013 15:46, Leela Krishna Amudala <l.krishna@samsung.com> wrote:
>         watchdog@101D0000 {
> -               compatible = "samsung,s3c2410-wdt";
> -               reg = <0x101D0000 0x100>;
> +               compatible = "samsung,s3c5250-wdt";
> +               reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;

nit: Please maintain consistency with the hex number case.
-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V2 3/4] watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses
       [not found]   ` <1380276986-24131-4-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-09-27 16:53     ` Sachin Kamat
  0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-09-27 16:53 UTC (permalink / raw)
  To: Leela Krishna Amudala
  Cc: linux-samsung-soc, Wim Van Sebroeck, Kukjin Kim,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Tomasz Figa, Douglas Anderson,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA

On 27 September 2013 15:46, Leela Krishna Amudala <l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> This patch parses the watchdog node to read pmu wdt sys registers addresses
> and do mask/unmask enable/disable of WDT in probe and s2r scenarios.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
>  .../devicetree/bindings/watchdog/samsung-wdt.txt   |   24 ++++-
>  drivers/watchdog/s3c2410_wdt.c                     |   94 ++++++++++++++++++--
>  2 files changed, 108 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
> index 2aa486c..f78b802 100644
> --- a/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/samsung-wdt.txt
> @@ -5,10 +5,30 @@ after a preset amount of time during which the WDT reset event has not
>  occurred.
>
>  Required properties:
> -- compatible : should be "samsung,s3c2410-wdt"
> +- compatible : should be "samsung,s3c2410-wdt" or "samsung,s3c5250-wdt"

It would also be helpful to mention the SoCs along with the compatibles strings.

>  - reg : base physical address of the controller and length of memory mapped
> -       region.
> +       region and additional (addresses and length of memory mapped regions
> +       of) PMU registers for masking/unmasking WDT only in case of Exynos5250 and 5420.
>  - interrupts : interrupt number to the cpu.
> +- reset-mask-bit: bit number in the PMU registers to program mask/unmask WDT (required only
> +       in case of Exynos5250 and 5420).
>
>  Optional properties:
>  - timeout-sec : contains the watchdog timeout in seconds.
> +
> +Examples:
> +
> +watchdog {

watchdog@101D0000

> +       compatible = "samsung,s3c2410-wdt";
> +       reg = <0x101D0000 0x100>;
> +       interrupts = <0 42 0>;
> +       status = "disabled";
> +};
> +
> +watchdog {

ditto

> +        compatible = "samsung,s3c5250-wdt";
> +        reg = <0x101D0000 0x100>, <0x10040408 0x4>, <0x1004040c 0x4>;

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V2 1/4] ARM: dts: Fix the watchdog DT node name for Exynos5
       [not found]     ` <1380276986-24131-2-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-09-27 21:04       ` Doug Anderson
  0 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2013-09-27 21:04 UTC (permalink / raw)
  To: Leela Krishna Amudala
  Cc: linux-samsung-soc, Wim Van Sebroeck, Kukjin Kim,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Tomasz Figa,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA

Leela Krishna,

On Fri, Sep 27, 2013 at 3:16 AM, Leela Krishna Amudala
<l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> Fixes the watchdog DT node name for Exynos5 as per the DT node naming
> convention also update "status" property for Exynos5250 SoC.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
>  arch/arm/boot/dts/exynos5.dtsi    |    2 +-
>  arch/arm/boot/dts/exynos5250.dtsi |    3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420
  2013-09-27 10:16 ` [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420 Leela Krishna Amudala
@ 2013-09-27 21:07   ` Doug Anderson
  0 siblings, 0 replies; 9+ messages in thread
From: Doug Anderson @ 2013-09-27 21:07 UTC (permalink / raw)
  To: Leela Krishna Amudala
  Cc: linux-samsung-soc, Wim Van Sebroeck, Kukjin Kim, devicetree,
	Tomasz Figa, linux-watchdog

Leela Krishna,

On Fri, Sep 27, 2013 at 3:16 AM, Leela Krishna Amudala
<l.krishna@samsung.com> wrote:
> Add watchdog device tree node for exynos5420
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5420.dtsi |    6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Doug Anderson <dianders@chromium.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-27 21:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 10:16 [PATCH V2 0/4] Add watchdog DT nodes and parse it to read PMU registers addresses Leela Krishna Amudala
2013-09-27 10:16 ` [PATCH V2 2/4] ARM: dts: add watchdog device tree node for exynos5420 Leela Krishna Amudala
2013-09-27 21:07   ` Doug Anderson
2013-09-27 10:16 ` [PATCH V2 3/4] watchdog: s3c2410_wdt: parse watchdog dt node to read PMU registers adresses Leela Krishna Amudala
     [not found]   ` <1380276986-24131-4-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-27 16:53     ` Sachin Kamat
     [not found] ` <1380276986-24131-1-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-27 10:16   ` [PATCH V2 1/4] ARM: dts: Fix the watchdog DT node name for Exynos5 Leela Krishna Amudala
     [not found]     ` <1380276986-24131-2-git-send-email-l.krishna-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-27 21:04       ` Doug Anderson
2013-09-27 10:16   ` [PATCH V2 4/4] ARM: dts: exynos: add PMU registers addresses and mask bit to watchdog node Leela Krishna Amudala
2013-09-27 16:47     ` Sachin Kamat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).