All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog
@ 2015-11-18  2:45 ` Nicolas Boichat
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Boichat @ 2015-11-18  2:45 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Wim Van Sebroeck, linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

WDT_MODE value need to be or-ed with MODE_KEY when setting
watchdog mode. Add it to mtk_wdt_stop function, so that the
watchdog can be stopped (e.g. during suspend).

Signed-off-by: Nicolas Boichat <drinkcat-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/watchdog/mtk_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 6ad9df9..b751f43 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
 
 	reg = readl(wdt_base + WDT_MODE);
 	reg &= ~WDT_MODE_EN;
+	reg |= WDT_MODE_KEY;
 	iowrite32(reg, wdt_base + WDT_MODE);
 
 	return 0;
-- 
2.6.0.rc2.230.g3dd15c0

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 7+ messages in thread

end of thread, other threads:[~2015-11-20 16:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18  2:45 [PATCH] watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog Nicolas Boichat
2015-11-18  2:45 ` Nicolas Boichat
2015-11-18  2:45 ` Nicolas Boichat
2015-11-18 16:24 ` Guenter Roeck
2015-11-18 16:24   ` Guenter Roeck
2015-11-20 16:51   ` Matthias Brugger
2015-11-20 16:51     ` Matthias Brugger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.