Skip to content

Commit 5da2bf1

Browse files
drinkcatWim Van Sebroeck
authored andcommitted
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 <[email protected]> Acked-by: Matthias Brugger <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 646251a commit 5da2bf1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/watchdog/mtk_wdt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
123123

124124
reg = readl(wdt_base + WDT_MODE);
125125
reg &= ~WDT_MODE_EN;
126+
reg |= WDT_MODE_KEY;
126127
iowrite32(reg, wdt_base + WDT_MODE);
127128

128129
return 0;

0 commit comments

Comments
 (0)