Received: by 10.192.165.148 with SMTP id m20csp1508768imm; Thu, 10 May 2018 11:49:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrbJYzA4jRSztXbktebLNc/yT0GE8uv0fyHlC2SL/1CxvyhRjbH7SMny8N7Pijv5vKZ50P9 X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr2439438pld.315.1525978189759; Thu, 10 May 2018 11:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525978189; cv=none; d=google.com; s=arc-20160816; b=II7QLnwLeWiy2pAn1it/VdaBJD5EK7IHxt5/ProwCNuWGVT+DIE6Rmy982leQ9T5Qb cveYewa99jw/Sm8JC3nmb2EUUyiDrEtdGZpY0deq2htcwBS5EjiKPelJrupCf9wSWO1n uYUthT7xSKPISMs5hbN3vUD52OAEsE4j6/sG4YeonWYscn0knICezJL1BAcZparou4jR KY+K2UIKtTyPMcnzvv4L9nTZyiEJ5KUXQhfpscBig3NrbNf4Wt9F1j6/ysYgTlrDvaTd 1B0lFoFY9IxdQ+eaB13LLA37AtmimcsCENurke3e3h9oWiCZxM48Nnw69z55iyRo/lVT 0jYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:message-id:date:subject:cc :to:from:arc-authentication-results; bh=1Jh2aRtSugJI0ust70Bl28je/me+OuaTKCbRrDR5MiU=; b=xov6Jw6e7WINL/epyPb0e0Q7SY50JigODEi+lL9195bWToxQfxjiD7ajw0+DsZOQtM 3xXjwxpOs8jps3cqtSCaFbY/RgBXJNJOkJVN5p+3ia7/4Sh95EHtlLiHikclwhU2RN6w 5oii/s5ge63MP7zSGXoFTwR51dz8Gm3UVgBdTnoCIBhdWw8Cxxh7cx1y6TMu/FHNRaMn 3V534TbuRMujzZJOYC5xKnAdNewikcKrjFa6qEnZ/hgko7uRbOUOV7gMf/4AoI5X500V 5jr5ls4jF230cHy5kiHz4oaJ8kJ+geFda0NZtYJox1ENPX+NkJWMZJdMAC6OVz16XeLc oqCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=nBpXckX4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si1105515pgp.273.2018.05.10.11.49.34; Thu, 10 May 2018 11:49:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=nBpXckX4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbeEJSsP (ORCPT + 99 others); Thu, 10 May 2018 14:48:15 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:54970 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbeEJSsN (ORCPT ); Thu, 10 May 2018 14:48:13 -0400 From: Paul Cercueil To: Guenter Roeck , Rob Herring , Mark Rutland , Ralf Baechle , James Hogan Cc: Wim Van Sebroeck , Mathieu Malaterre , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Paul Cercueil Subject: [PATCH v3 1/8] watchdog: JZ4740: Disable clock after stopping counter Date: Thu, 10 May 2018 20:47:44 +0200 Message-Id: <20180510184751.13416-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1525978090; bh=1Jh2aRtSugJI0ust70Bl28je/me+OuaTKCbRrDR5MiU=; h=From:To:Cc:Subject:Date:Message-Id; b=nBpXckX4pYSm2NPVBIBRhjpiYrDOHsbBUQNXEzy+eHhqZzYq+Jrs4PjBs2VodgFwrG04nSQsYtaCjB/kOgGIjJRRgzWIvLulHbHV4FMycdyXYRYpAduuP4xAz/IxZBrcqS3K9tiobzcig2g6POOMMm3XsrEvKs/YpmdfTOJL29E= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previously, the clock was disabled first, which makes the watchdog component insensitive to register writes. Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck --- drivers/watchdog/jz4740_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: No change v3: No change diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index aafbeb96561b..55c9a1f26498 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