Skip to content

Commit

Permalink
watchdog: JZ4740: Disable clock after stopping counter
Browse files Browse the repository at this point in the history
Previously, the clock was disabled first, which makes the watchdog
component insensitive to register writes.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Mathieu Malaterre <malat@debian.org>
Cc: linux-watchdog@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: James Hogan <jhogan@kernel.org>
  • Loading branch information
Paul Cercueil authored and James Hogan committed May 14, 2018
1 parent aae22f1 commit 212c105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/jz4740_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ static int jz4740_wdt_stop(struct watchdog_device *wdt_dev)
{
struct jz4740_wdt_drvdata *drvdata = watchdog_get_drvdata(wdt_dev);

jz4740_timer_disable_watchdog();
writeb(0x0, drvdata->base + JZ_REG_WDT_COUNTER_ENABLE);
jz4740_timer_disable_watchdog();

return 0;
}
Expand Down

0 comments on commit 212c105

Please sign in to comment.