linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shruthi.sanil@intel.com
To: wim@linux-watchdog.org, linux@roeck-us.net,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: andriy.shevchenko@linux.intel.com, kris.pan@linux.intel.com,
	mgross@linux.intel.com, srikanth.thokala@intel.com,
	lakshmi.bai.raja.subramanian@intel.com,
	mallikarjunappa.sangannavar@intel.com, shruthi.sanil@intel.com
Subject: [PATCH v2 4/9] watchdog: keembay: Clear either the TO or TH interrupt bit
Date: Mon, 17 May 2021 23:19:48 +0530	[thread overview]
Message-ID: <20210517174953.19404-5-shruthi.sanil@intel.com> (raw)
In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com>

From: Shruthi Sanil <shruthi.sanil@intel.com>

During the interrupt service routine of the TimeOut interrupt and
the ThresHold interrupt, the respective interrupt clear bit
have to be cleared and not both.

Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Kris Pan <kris.pan@intel.com>
Signed-off-by: Shruthi Sanil <shruthi.sanil@intel.com>
---
 drivers/watchdog/keembay_wdt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c
index 6053416b8d3d..f2a16c9933c3 100644
--- a/drivers/watchdog/keembay_wdt.c
+++ b/drivers/watchdog/keembay_wdt.c
@@ -23,7 +23,8 @@
 #define TIM_WDOG_EN		0x8
 #define TIM_SAFE		0xc
 
-#define WDT_ISR_MASK		GENMASK(9, 8)
+#define WDT_TH_INT_MASK		BIT(8)
+#define WDT_TO_INT_MASK		BIT(9)
 #define WDT_ISR_CLEAR		0x8200ff18
 #define WDT_UNLOCK		0xf1d0dead
 #define WDT_LOAD_MAX		U32_MAX
@@ -142,7 +143,7 @@ static irqreturn_t keembay_wdt_to_isr(int irq, void *dev_id)
 	struct arm_smccc_res res;
 
 	keembay_wdt_writel(wdt, TIM_WATCHDOG, 1);
-	arm_smccc_smc(WDT_ISR_CLEAR, WDT_ISR_MASK, 0, 0, 0, 0, 0, 0, &res);
+	arm_smccc_smc(WDT_ISR_CLEAR, WDT_TO_INT_MASK, 0, 0, 0, 0, 0, 0, &res);
 	dev_crit(wdt->wdd.parent, "Intel Keem Bay non-sec wdt timeout.\n");
 	emergency_restart();
 
@@ -156,7 +157,7 @@ static irqreturn_t keembay_wdt_th_isr(int irq, void *dev_id)
 
 	keembay_wdt_set_pretimeout(&wdt->wdd, 0x0);
 
-	arm_smccc_smc(WDT_ISR_CLEAR, WDT_ISR_MASK, 0, 0, 0, 0, 0, 0, &res);
+	arm_smccc_smc(WDT_ISR_CLEAR, WDT_TH_INT_MASK, 0, 0, 0, 0, 0, 0, &res);
 	dev_crit(wdt->wdd.parent, "Intel Keem Bay non-sec wdt pre-timeout.\n");
 	watchdog_notify_pretimeout(&wdt->wdd);
 
-- 
2.17.1


  parent reply	other threads:[~2021-05-17 17:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 17:49 [PATCH v2 0/9] Intel Keem Bay WDT bug fixes shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 1/9] watchdog: keembay: Update WDT pre-timeout during the initialization shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 2/9] watchdog: keembay: Upadate WDT pretimeout for every update in timeout shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 3/9] watchdog: keembay: Update pretimeout to zero in the TH ISR shruthi.sanil
2021-05-17 17:49 ` shruthi.sanil [this message]
2021-05-17 17:49 ` [PATCH v2 5/9] watchdog: keembay: Remove timeout update in the WDT start function shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 6/9] watchdog: keembay: Removed timeout update in the TO ISR shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 7/9] watchdog: keembay: MACRO for WDT enable and disable values shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 8/9] watchdog: keembay: WDT SMC handler MACRO name update shruthi.sanil
2021-05-17 17:49 ` [PATCH v2 9/9] watchdog: keembay: Typo corrections and other blank operations shruthi.sanil
2021-05-24  6:06 ` [PATCH v2 0/9] Intel Keem Bay WDT bug fixes Sanil, Shruthi
2021-05-24 10:36   ` andriy.shevchenko
2021-05-24 13:42     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210517174953.19404-5-shruthi.sanil@intel.com \
    --to=shruthi.sanil@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kris.pan@linux.intel.com \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mallikarjunappa.sangannavar@intel.com \
    --cc=mgross@linux.intel.com \
    --cc=srikanth.thokala@intel.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).