Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753965AbdL1Qba (ORCPT ); Thu, 28 Dec 2017 11:31:30 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:48078 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbdL1Q34 (ORCPT ); Thu, 28 Dec 2017 11:29:56 -0500 From: Paul Cercueil To: Ralf Baechle , Rob Herring , Mark Rutland , Wim Van Sebroeck , Guenter Roeck Cc: devicetree@vger.kernel.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Paul Cercueil Subject: [PATCH 1/7] watchdog: JZ4740: Disable clock after stopping counter Date: Thu, 28 Dec 2017 17:29:33 +0100 Message-Id: <20171228162939.3928-2-paul@crapouillou.net> In-Reply-To: <20171228162939.3928-1-paul@crapouillou.net> References: <20171228162939.3928-1-paul@crapouillou.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 750 Lines: 24 Previously, the clock was disabled first, which makes the watchdog component insensitive to register writes. Signed-off-by: Paul Cercueil --- drivers/watchdog/jz4740_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 20627f22baf6..6955deb100ef 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -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; } -- 2.11.0