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>
This commit is contained in:
Родитель
646251a59c
Коммит
5da2bf1ac8
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче