From patchwork Mon May 17 17:49:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 441665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1692CC433ED for ; Mon, 17 May 2021 17:50:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E517F6109E for ; Mon, 17 May 2021 17:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240944AbhEQRvS (ORCPT ); Mon, 17 May 2021 13:51:18 -0400 Received: from mga17.intel.com ([192.55.52.151]:14146 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240342AbhEQRvQ (ORCPT ); Mon, 17 May 2021 13:51:16 -0400 IronPort-SDR: b+GjCWW3bb7k9/9Hq6R2IcmJ1EXltJnUbL1d6sA6303NkrT8XEKnvQFxiDe13xJ2RlqlmR/yYr JDzf3Dhf2Ixg== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="180803207" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180803207" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:00 -0700 IronPort-SDR: 3oojpha+WvJflejPuCLwk5elbQ4jnbTottHX+aH3kwYne8eMnzpKW319L6X0QY7vp2iwye8EAr FyqsAekv/TvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394031" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:49:57 -0700 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 1/9] watchdog: keembay: Update WDT pre-timeout during the initialization Date: Mon, 17 May 2021 23:19:45 +0530 Message-Id: <20210517174953.19404-2-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil The pretimeout register has a default reset value. Hence when a smaller WDT timeout is set which would be lesser than the default pretimeout, the system behaves abnormally, starts triggering the pretimeout interrupt even when the WDT is not enabled, most of the times leading to system crash. Hence an update in the pre-timeout is also required for the default timeout that is being configured. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index 547d3fea33ff..f2f5c9fae29c 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -29,6 +29,7 @@ #define WDT_LOAD_MAX U32_MAX #define WDT_LOAD_MIN 1 #define WDT_TIMEOUT 5 +#define WDT_PRETIMEOUT 4 static unsigned int timeout = WDT_TIMEOUT; module_param(timeout, int, 0); @@ -224,11 +225,13 @@ static int keembay_wdt_probe(struct platform_device *pdev) wdt->wdd.min_timeout = WDT_LOAD_MIN; wdt->wdd.max_timeout = WDT_LOAD_MAX / wdt->rate; wdt->wdd.timeout = WDT_TIMEOUT; + wdt->wdd.pretimeout = WDT_PRETIMEOUT; watchdog_set_drvdata(&wdt->wdd, wdt); watchdog_set_nowayout(&wdt->wdd, nowayout); watchdog_init_timeout(&wdt->wdd, timeout, dev); keembay_wdt_set_timeout(&wdt->wdd, wdt->wdd.timeout); + keembay_wdt_set_pretimeout(&wdt->wdd, wdt->wdd.pretimeout); ret = devm_watchdog_register_device(dev, &wdt->wdd); if (ret) From patchwork Mon May 17 17:49:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 440454 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54652C433B4 for ; Mon, 17 May 2021 17:50:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36AF5610E9 for ; Mon, 17 May 2021 17:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241105AbhEQRvW (ORCPT ); Mon, 17 May 2021 13:51:22 -0400 Received: from mga17.intel.com ([192.55.52.151]:14146 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241373AbhEQRvT (ORCPT ); Mon, 17 May 2021 13:51:19 -0400 IronPort-SDR: 9HrjiOyI4jLV5nvGMunLsc2NLzBKEEVedCT+n39at1DavmFyAgHXcfFFkeuR4QDp+iMGg4AWKh KK8wrmRzWlLQ== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="180803219" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180803219" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:03 -0700 IronPort-SDR: gE8lAuQwXGLrOMAoVOxVexJnrS/a4um2FUoxndQkscHxVzwx9KyssFgbmV6a73SVYw3nA5Cr/y 6ZkIxNhZdT7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394061" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:00 -0700 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 2/9] watchdog: keembay: Upadate WDT pretimeout for every update in timeout Date: Mon, 17 May 2021 23:19:46 +0530 Message-Id: <20210517174953.19404-3-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil The pre-timeout value to be programmed to the register has to be calculated and updated for every change in the timeout value. Else the threshold time wouldn't be calculated to its corresponding timeout. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index f2f5c9fae29c..b2afeb4a60e3 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -109,6 +109,7 @@ static int keembay_wdt_set_timeout(struct watchdog_device *wdog, u32 t) { wdog->timeout = t; keembay_wdt_set_timeout_reg(wdog); + keembay_wdt_set_pretimeout_reg(wdog); return 0; } From patchwork Mon May 17 17:49:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 441664 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A18CFC433B4 for ; Mon, 17 May 2021 17:50:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8979A61263 for ; Mon, 17 May 2021 17:50:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241685AbhEQRvZ (ORCPT ); Mon, 17 May 2021 13:51:25 -0400 Received: from mga17.intel.com ([192.55.52.151]:14146 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241517AbhEQRvY (ORCPT ); Mon, 17 May 2021 13:51:24 -0400 IronPort-SDR: RUocIHZAk5rsuOCKJtcEk5usWCd4+LoWGYwfmSKrqgloa43pGxLKx0zSicrODirbMadj4NqG9k KThlT0BrRK2w== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="180803224" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180803224" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:07 -0700 IronPort-SDR: blH80mSRAc1im9p1PVj7wRzarQfHPGaRFLDczeKbnxvGvouT2mad/W2Z/CuxftxWmvVk3MjhCB mkBdVE00LP2w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394077" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:03 -0700 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 3/9] watchdog: keembay: Update pretimeout to zero in the TH ISR Date: Mon, 17 May 2021 23:19:47 +0530 Message-Id: <20210517174953.19404-4-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil The pretimeout has to be updated to zero during the ISR of the ThresHold interrupt. Else the TH interrupt would be triggerred for every tick until the timeout. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index b2afeb4a60e3..6053416b8d3d 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -154,6 +154,8 @@ static irqreturn_t keembay_wdt_th_isr(int irq, void *dev_id) struct keembay_wdt *wdt = dev_id; struct arm_smccc_res res; + keembay_wdt_set_pretimeout(&wdt->wdd, 0x0); + arm_smccc_smc(WDT_ISR_CLEAR, WDT_ISR_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); From patchwork Mon May 17 17:49:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 440453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B982C433ED for ; Mon, 17 May 2021 17:50:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECC0D6109E for ; Mon, 17 May 2021 17:50:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242550AbhEQRv1 (ORCPT ); Mon, 17 May 2021 13:51:27 -0400 Received: from mga17.intel.com ([192.55.52.151]:14172 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241699AbhEQRv0 (ORCPT ); Mon, 17 May 2021 13:51:26 -0400 IronPort-SDR: UPPpX9/NocEgK6gmZmCz6UT0I34eF+27K+hqhHwz4nvJv/UkxqGnThRjfhCaWlT8qtsn+EaDFj 8FOqW8yPDp0Q== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="180803232" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180803232" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:09 -0700 IronPort-SDR: neXanyN4hTonynEoKXnQP9cveTI/yVIDuLyTFoqroBnmjwot2yFt1387I0OazIKFRTpNqCp7JX 6/eBGYgxf5sQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394104" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:06 -0700 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 Message-Id: <20210517174953.19404-5-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil 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 Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- 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); From patchwork Mon May 17 17:49:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 441663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE236C433B4 for ; Mon, 17 May 2021 17:50:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B713C610A1 for ; Mon, 17 May 2021 17:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242697AbhEQRvh (ORCPT ); Mon, 17 May 2021 13:51:37 -0400 Received: from mga17.intel.com ([192.55.52.151]:14172 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243031AbhEQRv3 (ORCPT ); Mon, 17 May 2021 13:51:29 -0400 IronPort-SDR: 5ydVnbHUvzHyTBErDeCoWpouY511OMX0BKcdAjRjmvpKjpfFjs7Cm/BM4eWwNAxRdbU2okMn3+ iKqGI0xaoqkg== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="180803237" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180803237" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:13 -0700 IronPort-SDR: 0zvNqGITTTv+q8uvBCJb430O3pFtrXVdTB1J/V7Tm+MoyLONlyq4ws916i90ywfdaEBIRF27LI FrLscaWd4eyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394122" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:09 -0700 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 5/9] watchdog: keembay: Remove timeout update in the WDT start function Date: Mon, 17 May 2021 23:19:49 +0530 Message-Id: <20210517174953.19404-6-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil Removed set timeout from the start WDT function. There is a function defined to set the timeout. Hence no need to set the timeout again in start function as the timeout would have been already updated before calling the start/enable. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index f2a16c9933c3..039753b9932b 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -84,7 +84,6 @@ static int keembay_wdt_start(struct watchdog_device *wdog) { struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); - keembay_wdt_set_timeout_reg(wdog); keembay_wdt_writel(wdt, TIM_WDOG_EN, 1); return 0; From patchwork Mon May 17 17:49:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 441662 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7972BC433ED for ; Mon, 17 May 2021 17:50:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C956610A1 for ; Mon, 17 May 2021 17:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243795AbhEQRv6 (ORCPT ); Mon, 17 May 2021 13:51:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:12911 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236551AbhEQRvw (ORCPT ); Mon, 17 May 2021 13:51:52 -0400 IronPort-SDR: MLUHvtB7MhnhFu5s7AFAYu4KawHJdXDatWFqq7mBVHtdpALnSZOaVuPy6mmIjg3QTW98Kfsemp 25v+nf7yb5sQ== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="187646364" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="187646364" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:34 -0700 IronPort-SDR: qKnT5euiMd7GIql909vIbDaIjdvCqD6Wp1kigw4TaUMYRk4VLnNa6h9gMbD5JoyQqNGCy8+dBe Z5+QXYNlL4aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394143" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:13 -0700 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 6/9] watchdog: keembay: Removed timeout update in the TO ISR Date: Mon, 17 May 2021 23:19:50 +0530 Message-Id: <20210517174953.19404-7-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil In the TO ISR removed updating the Timeout value because its not serving any purpose as the timer would have already expired and the system would be rebooting. Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc") Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index 039753b9932b..dd192b8dff55 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -141,7 +141,6 @@ static irqreturn_t keembay_wdt_to_isr(int irq, void *dev_id) struct keembay_wdt *wdt = dev_id; struct arm_smccc_res res; - keembay_wdt_writel(wdt, TIM_WATCHDOG, 1); 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(); From patchwork Mon May 17 17:49:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 440452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91294C433B4 for ; Mon, 17 May 2021 17:50:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77733610CD for ; Mon, 17 May 2021 17:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239953AbhEQRvx (ORCPT ); Mon, 17 May 2021 13:51:53 -0400 Received: from mga02.intel.com ([134.134.136.20]:12911 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236481AbhEQRvv (ORCPT ); Mon, 17 May 2021 13:51:51 -0400 IronPort-SDR: XdxYovPiruQELSQe1EnMyHFdbHdU/8xoIg67DaSALAvgtlLmSVyH3QC/mHa0ytfsUj0blFjSp6 oSNlr7bmzymQ== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="187646363" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="187646363" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:34 -0700 IronPort-SDR: XjpWXgykiTLLgTMKL6EL1poYl732Ta6evkuDt/sC/CLVVHeXP2gmVDeLVHXFzn+DfAOqNKbVP4 i4TcqgCVahfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394214" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:18 -0700 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 7/9] watchdog: keembay: MACRO for WDT enable and disable values Date: Mon, 17 May 2021 23:19:51 +0530 Message-Id: <20210517174953.19404-8-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil Introduced MACRO's for WDT enable and disable values for better readability Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index dd192b8dff55..d8c50b6291cd 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -27,6 +27,8 @@ #define WDT_TO_INT_MASK BIT(9) #define WDT_ISR_CLEAR 0x8200ff18 #define WDT_UNLOCK 0xf1d0dead +#define WDT_DISABLE 0x0 +#define WDT_ENABLE 0x1 #define WDT_LOAD_MAX U32_MAX #define WDT_LOAD_MIN 1 #define WDT_TIMEOUT 5 @@ -84,7 +86,7 @@ static int keembay_wdt_start(struct watchdog_device *wdog) { struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); - keembay_wdt_writel(wdt, TIM_WDOG_EN, 1); + keembay_wdt_writel(wdt, TIM_WDOG_EN, WDT_ENABLE); return 0; } @@ -93,7 +95,7 @@ static int keembay_wdt_stop(struct watchdog_device *wdog) { struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); - keembay_wdt_writel(wdt, TIM_WDOG_EN, 0); + keembay_wdt_writel(wdt, TIM_WDOG_EN, WDT_DISABLE); return 0; } From patchwork Mon May 17 17:49:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 440451 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01D2BC433B4 for ; Mon, 17 May 2021 17:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D994E610E9 for ; Mon, 17 May 2021 17:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236628AbhEQRv7 (ORCPT ); Mon, 17 May 2021 13:51:59 -0400 Received: from mga02.intel.com ([134.134.136.20]:12915 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236558AbhEQRvw (ORCPT ); Mon, 17 May 2021 13:51:52 -0400 IronPort-SDR: t6Ptn/S5EJSNuFmjWvakRJiJVSwEBjuKu3/P7TqvjEFgho29X35XMUkDtLeGxEV6UUZsWFDfKI J1COGp3NjSwg== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="187646365" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="187646365" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:34 -0700 IronPort-SDR: 9E7a99yCj545AwSmkrAdMsZkf3ivuZBlaiaTfFKAdRKFcrUnwYLBJ7/6R6UHCwgmMy5sNM7jc0 rGskGANVgXTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394216" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:22 -0700 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 8/9] watchdog: keembay: WDT SMC handler MACRO name update Date: Mon, 17 May 2021 23:19:52 +0530 Message-Id: <20210517174953.19404-9-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil Updated the WDT SMC handler MACRO name to make it clear that its a ARM SMC handler that helps in clearing the WDT interrupt bit. Reviewed-by: Guenter Roeck Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index d8c50b6291cd..5ac823487b70 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -25,7 +25,7 @@ #define WDT_TH_INT_MASK BIT(8) #define WDT_TO_INT_MASK BIT(9) -#define WDT_ISR_CLEAR 0x8200ff18 +#define WDT_INT_CLEAR_SMC 0x8200ff18 #define WDT_UNLOCK 0xf1d0dead #define WDT_DISABLE 0x0 #define WDT_ENABLE 0x1 @@ -143,7 +143,7 @@ static irqreturn_t keembay_wdt_to_isr(int irq, void *dev_id) struct keembay_wdt *wdt = dev_id; struct arm_smccc_res res; - arm_smccc_smc(WDT_ISR_CLEAR, WDT_TO_INT_MASK, 0, 0, 0, 0, 0, 0, &res); + arm_smccc_smc(WDT_INT_CLEAR_SMC, 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(); @@ -157,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_TH_INT_MASK, 0, 0, 0, 0, 0, 0, &res); + arm_smccc_smc(WDT_INT_CLEAR_SMC, 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); From patchwork Mon May 17 17:49:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sanil, Shruthi" X-Patchwork-Id: 441661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB8ABC43460 for ; Mon, 17 May 2021 17:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B96DC610A1 for ; Mon, 17 May 2021 17:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236647AbhEQRv7 (ORCPT ); Mon, 17 May 2021 13:51:59 -0400 Received: from mga09.intel.com ([134.134.136.24]:43824 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243031AbhEQRvz (ORCPT ); Mon, 17 May 2021 13:51:55 -0400 IronPort-SDR: zMMNGMdL1N4cyYEpWz9hy9PARsALYmu9XLkaCJ7U/yYTfYpsgloL/VpQlKvmGqQ/VJx/Yb7GsR h8dDhiMz+rgA== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="200574487" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="200574487" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 10:50:35 -0700 IronPort-SDR: WfSgJvnCbTM9dai/22Zr5go68hiR4XfXDKpz3SN3Y4039ZA/BTE+OEgQkAGD9RDhzlm/zPy/BB le5XEDtt9wgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460394218" Received: from bspteam04.iind.intel.com ([10.106.46.142]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 10:50:25 -0700 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 9/9] watchdog: keembay: Typo corrections and other blank operations Date: Mon, 17 May 2021 23:19:53 +0530 Message-Id: <20210517174953.19404-10-shruthi.sanil@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210517174953.19404-1-shruthi.sanil@intel.com> References: <20210517174953.19404-1-shruthi.sanil@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Shruthi Sanil Corrected typos, aligned the tabs and added new lines wherever required for better readability Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Tested-by: Kris Pan Signed-off-by: Shruthi Sanil --- drivers/watchdog/keembay_wdt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c index 5ac823487b70..2a39114dbc64 100644 --- a/drivers/watchdog/keembay_wdt.c +++ b/drivers/watchdog/keembay_wdt.c @@ -26,11 +26,14 @@ #define WDT_TH_INT_MASK BIT(8) #define WDT_TO_INT_MASK BIT(9) #define WDT_INT_CLEAR_SMC 0x8200ff18 + #define WDT_UNLOCK 0xf1d0dead #define WDT_DISABLE 0x0 #define WDT_ENABLE 0x1 + #define WDT_LOAD_MAX U32_MAX #define WDT_LOAD_MIN 1 + #define WDT_TIMEOUT 5 #define WDT_PRETIMEOUT 4 @@ -144,7 +147,7 @@ static irqreturn_t keembay_wdt_to_isr(int irq, void *dev_id) struct arm_smccc_res res; arm_smccc_smc(WDT_INT_CLEAR_SMC, WDT_TO_INT_MASK, 0, 0, 0, 0, 0, 0, &res); - dev_crit(wdt->wdd.parent, "Intel Keem Bay non-sec wdt timeout.\n"); + dev_crit(wdt->wdd.parent, "Intel Keem Bay non-secure wdt timeout.\n"); emergency_restart(); return IRQ_HANDLED; @@ -158,7 +161,7 @@ static irqreturn_t keembay_wdt_th_isr(int irq, void *dev_id) keembay_wdt_set_pretimeout(&wdt->wdd, 0x0); arm_smccc_smc(WDT_INT_CLEAR_SMC, 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"); + dev_crit(wdt->wdd.parent, "Intel Keem Bay non-secure wdt pre-timeout.\n"); watchdog_notify_pretimeout(&wdt->wdd); return IRQ_HANDLED; @@ -278,8 +281,8 @@ static const struct of_device_id keembay_wdt_match[] = { MODULE_DEVICE_TABLE(of, keembay_wdt_match); static struct platform_driver keembay_wdt_driver = { - .probe = keembay_wdt_probe, - .driver = { + .probe = keembay_wdt_probe, + .driver = { .name = "keembay_wdt", .of_match_table = keembay_wdt_match, .pm = &keembay_wdt_pm_ops,