summaryrefslogtreecommitdiff
path: root/drivers/watchdog/mtk_wdt.c
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2015-11-18 05:45:01 +0300
committerWim Van Sebroeck <wim@iguana.be>2015-11-23 11:00:09 +0300
commit5da2bf1ac8fbe701a138efb340b9f2ef26c10ed7 (patch)
treefaaf416c157710a39d975cbd9177cdbf965de557 /drivers/watchdog/mtk_wdt.c
parent646251a59c73253a7a2c7b1d6adbedd2292390a0 (diff)
downloadlinux-5da2bf1ac8fbe701a138efb340b9f2ef26c10ed7.tar.xz
watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog
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@chromium.org> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/mtk_wdt.c')
-rw-r--r--drivers/watchdog/mtk_wdt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 6ad9df948711..b751f43d76ed 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;