linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: renesas_wdt: Fix interrupt enable for timer
@ 2019-05-23  9:29 Nguyen An Hoan
  2019-05-23  9:29 ` [PATCH] watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly Nguyen An Hoan
  2019-05-23 11:04 ` [PATCH] watchdog: renesas_wdt: Fix interrupt enable for timer Wolfram Sang
  0 siblings, 2 replies; 11+ messages in thread
From: Nguyen An Hoan @ 2019-05-23  9:29 UTC (permalink / raw)
  To: linux-renesas-soc, geert+renesas, linux-watchdog, wim, linux,
	wsa+renesas
  Cc: kuninori.morimoto.gx, yoshihiro.shimoda.uh, h-inayoshi, cv-dong

From: Hoan Nguyen An <na-hoan@jinso.co.jp>

Fix setting for bit WOVFE of RWTCSRA. Keep it enable follow hardware document.

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
---
 drivers/watchdog/renesas_wdt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 565dbc1..a6aca0e 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -19,6 +19,7 @@
 
 #define RWTCNT		0
 #define RWTCSRA		4
+#define RWTCSRA_WOVFE	BIT(3)
 #define RWTCSRA_WOVF	BIT(4)
 #define RWTCSRA_WRFLG	BIT(5)
 #define RWTCSRA_TME	BIT(7)
@@ -82,13 +83,14 @@ static int rwdt_start(struct watchdog_device *wdev)
 	rwdt_write(priv, val, RWTCSRA);
 
 	rwdt_init_timeout(wdev);
-	rwdt_write(priv, priv->cks, RWTCSRA);
+	val |= priv->cks;
+	rwdt_write(priv, val, RWTCSRA);
 	rwdt_write(priv, 0, RWTCSRB);
 
 	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
 		cpu_relax();
-
-	rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
+	/* Enable interrupt and timer */
+	rwdt_write(priv, val | RWTCSRA_WOVFE | RWTCSRA_TME, RWTCSRA);
 
 	return 0;
 }
-- 
2.7.4


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

end of thread, other threads:[~2019-06-13 15:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23  9:29 [PATCH] watchdog: renesas_wdt: Fix interrupt enable for timer Nguyen An Hoan
2019-05-23  9:29 ` [PATCH] watchdog: renesas_wdt: Use 'dev' instead of dereferencing it repeatedly Nguyen An Hoan
2019-05-23 11:06   ` Wolfram Sang
2019-05-27 16:22     ` Guenter Roeck
2019-05-28  7:38   ` Geert Uytterhoeven
2019-06-07 17:31   ` Guenter Roeck
2019-06-13  9:28     ` Simon Horman
2019-05-23 11:04 ` [PATCH] watchdog: renesas_wdt: Fix interrupt enable for timer Wolfram Sang
2019-05-23 11:26   ` Geert Uytterhoeven
2019-05-24  1:13   ` "グェン・アン・ホァン"
2019-05-24  2:01     ` Yoshihiro Shimoda

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).