Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp388358ybl; Tue, 7 Jan 2020 07:52:12 -0800 (PST) X-Google-Smtp-Source: APXvYqygx5ZziWZmSEAhTjvAXGlI4hAvgEmrJFSTALX4qLf0KOLEaFuHTqsVL4Sa56yb6Q9s6f8E X-Received: by 2002:a05:6830:1116:: with SMTP id w22mr432638otq.216.1578412332119; Tue, 07 Jan 2020 07:52:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578412332; cv=none; d=google.com; s=arc-20160816; b=gf9PPPti5SKQfICoYEDVVWK69yD5FoHYJM+KaSUOMUlhkB2r2XdP49thtG59IgkRfv /YJvA5lzuCQtxiCnnYuLL75iOMqc/8IzmjYjIVss59cHquK4Gu1y32f5kQgM5v9cKXEJ NQY7j71nSpMMyAzI8sGOG7BER0sNfUiVUQlPX0jwRJ+Hc9ahTqqHB2Gu921ZaCp2xBFO 2npqzYBwYgekTSqQPw1q25JLDF2kFoduqtRbs16V7k1e4uSUmdMEKOS4RIB/TiLxiqDd 6M5phF408C8mJG2KhAqJYUCxWkNdKukS4zHhdwd0EMyfGeK8PUE1eniEaTy9pfo9tOD0 RaHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=R8knqX76PKUOjI0G6KaFvUw0uxQLPnKaJ1MPpZ1RzQc=; b=X6B4C9xZPhf76DuYx1z3JAQiNupzjvcRK+n0k+seh3+1phrtnT4rQcWc/s9b89lzkB TCk4GAW4X6I1yYg6j8w0DbPPLcqaHNadwZhXM9x0F6MiaIkgJ3mJF9T6mLrwEmU+0VoT ZPlL7J+KNmDNO1RvifVs/bw4RLdZ/mr7s0/O+Bu0WKl3Uez5oCDVfyQwz9Q35SAuzxct 6PaOmdlcR/nFdPFKbOyavdpP4AYjZvf5ykXKhOVVGRxr69ze1pLofoxcATntwZjuR43k Kpv6d1z8lVp1dxZ6mg7fNXtpE4+n8lWHFgqrIbmTY56XeB9OOyg5bszE7lnj9i9ZeGHF qnXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si32105otl.54.2020.01.07.07.51.59; Tue, 07 Jan 2020 07:52:12 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728414AbgAGPvF (ORCPT + 99 others); Tue, 7 Jan 2020 10:51:05 -0500 Received: from unsecure-smtp.soverin.net ([94.130.159.241]:34241 "EHLO g02sm02.soverin.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727994AbgAGPvE (ORCPT ); Tue, 7 Jan 2020 10:51:04 -0500 X-Greylist: delayed 386 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Jan 2020 10:51:03 EST Received: from soverin.net by soverin.net From: Jack Mitchell Cc: ml@embed.me.uk, Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] watchdog: dw_wdt: ping watchdog to reset countdown before start Date: Tue, 7 Jan 2020 15:50:53 +0000 Message-Id: <20200107155054.278444-1-ml@embed.me.uk> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at g02sm02 X-Virus-Status: Clean Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently on an rk3288 SoC when trying to use the watchdog the SoC will instantly reset. This is due to the watchdog countdown counter being set to its initial value of 0x0. Reset the watchdog counter before start in order to correctly start the countdown timer from the right position. Signed-off-by: Jack Mitchell --- drivers/watchdog/dw_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index fef7c61f5555..4a902d015bc2 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -135,6 +135,7 @@ static int dw_wdt_start(struct watchdog_device *wdd) struct dw_wdt *dw_wdt = to_dw_wdt(wdd); dw_wdt_set_timeout(wdd, wdd->timeout); + dw_wdt_ping(&dw_wdt->wdd); dw_wdt_arm_system_reset(dw_wdt); return 0; -- 2.24.1