From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F39D1E0488; Wed, 6 Nov 2024 13:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730898081; cv=none; b=pKpdRBryK7OA01MM8ibdyLQQlFIjfzHUY7HGls9SLiYLuqPJJcYrey37eKVjwS6x1FsI0hFmc0fj3RV3RduV68IolLmOeKd43pjucOgEyBbdkNGSNmSd/zUatPWXn4I4Craf3tpdWImyf8LwrU8jVPe4aWSXbXat6PvZhomAEMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730898081; c=relaxed/simple; bh=i/Zfkuqm0TOt9WYTZaw5+O15g/OmOWf+9Ol0vEQZkVY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UGj2FuxxRQ1Lu6YI0FL+kTl0A2yc7DSkhuymlO547FUyye0QJkYfqrKR02DOcyKuaU0skvaWXBw3bpKMFDfdi43sX69PnRAHo4KzWl8kDpxong/d34wKQRE+VY2pZqxZxbpXBkSIsUqGencP9yerS8ioWf7Cfv/5ak+TUCnt50w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qp2l99ug; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qp2l99ug" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 951D9C4CECD; Wed, 6 Nov 2024 13:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730898080; bh=i/Zfkuqm0TOt9WYTZaw5+O15g/OmOWf+9Ol0vEQZkVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qp2l99uglkJVUnQdlyafZw+bUHmUGUYgQR73nqRqIwGf+JzZIPcAdwkWQab8ETOxp Jj2MWitCxMLlysmknh6o2u1wM/xitR7e3QVxy9yhznt9FpYdg6vvpcKfFYV71B5RsU PKMSPDZMxcvLEHiiS4vKswkR64jDUIahsiyjJFl0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jonas Blixt , Anson Huang , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 5.4 118/462] watchdog: imx_sc_wdt: Dont disable WDT in suspend Date: Wed, 6 Nov 2024 13:00:11 +0100 Message-ID: <20241106120334.423036148@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106120331.497003148@linuxfoundation.org> References: <20241106120331.497003148@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jonas Blixt [ Upstream commit 2d9d6d300fb0a4ae4431bb308027ac9385746d42 ] Parts of the suspend and resume chain is left unprotected if we disable the WDT here. >>From experiments we can see that the SCU disables and re-enables the WDT when we enter and leave suspend to ram. By not touching the WDT here we are protected by the WDT all the way to the SCU. Signed-off-by: Jonas Blixt CC: Anson Huang Fixes: 986857acbc9a ("watchdog: imx_sc: Add i.MX system controller watchdog support") Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240801121845.1465765-1-jonas.blixt@actia.se Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Sasha Levin --- drivers/watchdog/imx_sc_wdt.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/watchdog/imx_sc_wdt.c b/drivers/watchdog/imx_sc_wdt.c index 8c9936e78bee0..f11f4c2bb0e50 100644 --- a/drivers/watchdog/imx_sc_wdt.c +++ b/drivers/watchdog/imx_sc_wdt.c @@ -215,29 +215,6 @@ static int imx_sc_wdt_probe(struct platform_device *pdev) return devm_watchdog_register_device(dev, wdog); } -static int __maybe_unused imx_sc_wdt_suspend(struct device *dev) -{ - struct imx_sc_wdt_device *imx_sc_wdd = dev_get_drvdata(dev); - - if (watchdog_active(&imx_sc_wdd->wdd)) - imx_sc_wdt_stop(&imx_sc_wdd->wdd); - - return 0; -} - -static int __maybe_unused imx_sc_wdt_resume(struct device *dev) -{ - struct imx_sc_wdt_device *imx_sc_wdd = dev_get_drvdata(dev); - - if (watchdog_active(&imx_sc_wdd->wdd)) - imx_sc_wdt_start(&imx_sc_wdd->wdd); - - return 0; -} - -static SIMPLE_DEV_PM_OPS(imx_sc_wdt_pm_ops, - imx_sc_wdt_suspend, imx_sc_wdt_resume); - static const struct of_device_id imx_sc_wdt_dt_ids[] = { { .compatible = "fsl,imx-sc-wdt", }, { /* sentinel */ } @@ -249,7 +226,6 @@ static struct platform_driver imx_sc_wdt_driver = { .driver = { .name = "imx-sc-wdt", .of_match_table = imx_sc_wdt_dt_ids, - .pm = &imx_sc_wdt_pm_ops, }, }; module_platform_driver(imx_sc_wdt_driver); -- 2.43.0