From mboxrd@z Thu Jan 1 00:00:00 1970 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 C235DC6379A for ; Mon, 19 Jul 2021 16:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC40B61002 for ; Mon, 19 Jul 2021 16:32:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349224AbhGSPuK (ORCPT ); Mon, 19 Jul 2021 11:50:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:47934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241276AbhGSPqS (ORCPT ); Mon, 19 Jul 2021 11:46:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD42E6145A; Mon, 19 Jul 2021 16:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626712014; bh=dtrbSkRrJsSWp/litbZIc5oikePs1EjtcjMjJ7YtHmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNBRifpdQFkRy4Gh0q754w7OffpSzScpHoQWHtFIS7yog9g028d6VQoPYdvpxe/Ev HNEni3R1UL57+Ar2oyhWc3VpBH52SUlrlfZQMUVnralPxbueUXKG6ROHBdgSUJql+r wHDvBzykzvnayU198nE0+zKt1HK31I9ad9RfTeP8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Andy Shevchenko , Kris Pan , Shruthi Sanil , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 5.12 190/292] watchdog: keembay: Upadate WDT pretimeout for every update in timeout Date: Mon, 19 Jul 2021 16:54:12 +0200 Message-Id: <20210719144948.740324599@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144942.514164272@linuxfoundation.org> References: <20210719144942.514164272@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shruthi Sanil [ Upstream commit 0f7bfaf10c0abc979220442bae2af4f1f869c41e ] 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 Link: https://lore.kernel.org/r/20210517174953.19404-3-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- 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; } -- 2.30.2