Skip to content

Commit

Permalink
watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Boichat authored and Wim Van Sebroeck committed Nov 23, 2015
1 parent 646251a commit 5da2bf1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/watchdog/mtk_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5da2bf1

Please sign in to comment.