watchdog: aspeed: Retain watchdog enabled state
"Linux Kernel Mailing List" <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.head |
|---|---|
| Message-ID | <[email protected]> |
Web: https://git.kernel.org/torvalds/c/9f3e13c74e1b4f370c3de06cb504c003091c9673 Commit: 9f3e13c74e1b4f370c3de06cb504c003091c9673 Parent: be17980d9be5a5c1ece83836b24fabce648b92aa Refname: refs/heads/master Author: Andrew Jeffery <[email protected]> AuthorDate: Wed Sep 20 15:00:17 2017 +0930 Committer: Wim Van Sebroeck <[email protected]> CommitDate: Thu Dec 28 20:44:48 2017 +0100 watchdog: aspeed: Retain watchdog enabled state An unintended post-condition of probe() is that the watchdog is disabled. This behaviour was introduced by an unnecessary write to the control register to configure the hardware based on the devicetree. The write is unnecessary because the cached control value that is manipulated by the code parsing the devicetree is eventually written by aspeed_wdt_enable(), which is when we care how the control register should be configured. Remove the write to restore expected behaviour. Fixes: b7f0b8ad25f3 ("drivers/watchdog: ASPEED reference dev tree properties for config") Signed-off-by: Andrew Jeffery <[email protected]> Reviewed-by: Joel Stanley <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> --- drivers/watchdog/aspeed_wdt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index 79cc766cd30f..6c6dd3f4c48d 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -243,9 +243,13 @@ static int aspeed_wdt_probe(struct platform_device *pdev) if (of_property_read_bool(np, "aspeed,external-signal")) wdt->ctrl |= WDT_CTRL_WDT_EXT; - writel(wdt->ctrl, wdt->base + WDT_CTRL);