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 CE03B1D0164; Wed, 2 Oct 2024 13:38:56 +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=1727876336; cv=none; b=KcoZu6YBTs0s9QKsk3j1pvh+Qk/EEipojgseHQN3vMfK+ROcBz/1B/QJbq6rrP5Wc0oSYKMLUfQ9J2ogvARKPpVf40uDrE3CIqvLYnbtKvyAZ5AmT+XHY88pSxuJ08/oF4gB66MDWBsiwkreBLGuBTkE5Z5at3qKpSDgWK7G2VY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727876336; c=relaxed/simple; bh=/v+eoh7KH2T6KrfJ8JJo4kgg+Cma4K9y7UFcyGK/EjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VCq1E25C+hCxsLiZN7Hye4tOmLrfmBkkkTsmn9K+v8guNsV9FwCfIs3ux33cIqEdXrJ0nmh9uALHa/LBmFyjLLfioFV8utjyPNQePgCxoQBUhuZA4vpYwYoLRYrJlvd3doSzXLjVjG9+gvNyiUwQ4TXAho93SSp1VwQhXDgcvvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QLkQJKwm; 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="QLkQJKwm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5713CC4CECD; Wed, 2 Oct 2024 13:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727876336; bh=/v+eoh7KH2T6KrfJ8JJo4kgg+Cma4K9y7UFcyGK/EjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QLkQJKwmfeVHKgoiliN5fllMgAm2dKfSfr0r4A1glhSlxq7pyjsx0XvSpWf/2A4Gy PpZL8T+5bvGEVi2Zg00XLOTl0keQAyADpO4VZ+BdM4BIXrRsKmSPLf1HqY1UJ4pMJ7 vScIlsb9VdN7SCfORZzgpmTuz944Qgyd+LOecDoI= 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 6.11 409/695] watchdog: imx_sc_wdt: Dont disable WDT in suspend Date: Wed, 2 Oct 2024 14:56:47 +0200 Message-ID: <20241002125838.780536911@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241002125822.467776898@linuxfoundation.org> References: <20241002125822.467776898@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 6.11-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 e51fe1b78518f..d73076b686d8c 100644 --- a/drivers/watchdog/imx_sc_wdt.c +++ b/drivers/watchdog/imx_sc_wdt.c @@ -216,29 +216,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 */ } @@ -250,7 +227,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