Commit 5da2bf1a authored by Nicolas Boichat's avatar Nicolas Boichat Committed by Wim Van Sebroeck

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: default avatarNicolas Boichat <drinkcat@chromium.org>
Acked-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 646251a5
...@@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev) ...@@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
reg = readl(wdt_base + WDT_MODE); reg = readl(wdt_base + WDT_MODE);
reg &= ~WDT_MODE_EN; reg &= ~WDT_MODE_EN;
reg |= WDT_MODE_KEY;
iowrite32(reg, wdt_base + WDT_MODE); iowrite32(reg, wdt_base + WDT_MODE);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment