From patchwork Thu May 23 09:29:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?44Kw44Kn44Oz44O744Ki44Oz44O744Ob44Kh44Oz?= X-Patchwork-Id: 10957153 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B2E513AD for ; Thu, 23 May 2019 09:30:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70E1426E3C for ; Thu, 23 May 2019 09:30:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 656CD2841F; Thu, 23 May 2019 09:30:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C0D826E3C for ; Thu, 23 May 2019 09:30:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729966AbfEWJaW (ORCPT ); Thu, 23 May 2019 05:30:22 -0400 Received: from www3345.sakura.ne.jp ([49.212.235.55]:11169 "EHLO www3345.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727232AbfEWJaW (ORCPT ); Thu, 23 May 2019 05:30:22 -0400 Received: from fsav404.sakura.ne.jp (fsav404.sakura.ne.jp [133.242.250.103]) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x4N9TiJN043746; Thu, 23 May 2019 18:29:44 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) Received: from www3345.sakura.ne.jp (49.212.235.55) by fsav404.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp); Thu, 23 May 2019 18:29:44 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp) Received: from localhost (p14010-ipadfx41marunouchi.tokyo.ocn.ne.jp [61.118.107.10]) (authenticated bits=0) by www3345.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x4N9TdJr043711 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 May 2019 18:29:44 +0900 (JST) (envelope-from na-hoan@jinso.co.jp) From: Nguyen An Hoan To: linux-renesas-soc@vger.kernel.org, geert+renesas@glider.be, linux-watchdog@vger.kernel.org, wim@linux-watchdog.org, linux@roeck-us.net, wsa+renesas@sang-engineering.com Cc: kuninori.morimoto.gx@renesas.com, yoshihiro.shimoda.uh@renesas.com, h-inayoshi@jinso.co.jp, cv-dong@jinso.co.jp Subject: [PATCH] watchdog: renesas_wdt: Fix interrupt enable for timer Date: Thu, 23 May 2019 18:29:37 +0900 Message-Id: <1558603778-20848-1-git-send-email-na-hoan@jinso.co.jp> X-Mailer: git-send-email 2.7.4 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hoan Nguyen An Fix setting for bit WOVFE of RWTCSRA. Keep it enable follow hardware document. Signed-off-by: Hoan Nguyen An --- drivers/watchdog/renesas_wdt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c index 565dbc1..a6aca0e 100644 --- a/drivers/watchdog/renesas_wdt.c +++ b/drivers/watchdog/renesas_wdt.c @@ -19,6 +19,7 @@ #define RWTCNT 0 #define RWTCSRA 4 +#define RWTCSRA_WOVFE BIT(3) #define RWTCSRA_WOVF BIT(4) #define RWTCSRA_WRFLG BIT(5) #define RWTCSRA_TME BIT(7) @@ -82,13 +83,14 @@ static int rwdt_start(struct watchdog_device *wdev) rwdt_write(priv, val, RWTCSRA); rwdt_init_timeout(wdev); - rwdt_write(priv, priv->cks, RWTCSRA); + val |= priv->cks; + rwdt_write(priv, val, RWTCSRA); rwdt_write(priv, 0, RWTCSRB); while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG) cpu_relax(); - - rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA); + /* Enable interrupt and timer */ + rwdt_write(priv, val | RWTCSRA_WOVFE | RWTCSRA_TME, RWTCSRA); return 0; }