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 A34811D0DF3; Wed, 2 Oct 2024 14:13:28 +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=1727878408; cv=none; b=DCPUKSSty2Mpb6rbZoOAuptoRoDIclauqoEYFnIpI028A3QbIkfM2npZCNTfe3P7Lbrcik0vQXkvYFKOWJeNYIf/Azobx5SFg58wemawAefdjXQyS9ulnM9RbigpWAHwV8P2aAd2Ghuu6gt1OA3LaobYn4ADCoz58+N1c4DFmC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727878408; c=relaxed/simple; bh=a3TxVzeaX8E1U09nIx9nhVzi0ubAGrGxbN84QhY6OwM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YAyUom6m6Ydu9Ryjkx38favaHABp3rh8Si3sDHTJzjK4lakvega/UTF+UYGgFnRe0Pmrqo80TmiICUPr5sRCX5z56DMzR/6uCfTTnnc8xxY96zgG16rXmyt035/Pf+hcxwktycDvVWFOJVJTc0OlBuLTqnv2gme03hV6gDIvZmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gyrSv8F/; 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="gyrSv8F/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29F09C4CEC2; Wed, 2 Oct 2024 14:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727878408; bh=a3TxVzeaX8E1U09nIx9nhVzi0ubAGrGxbN84QhY6OwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gyrSv8F/i7SuJrx10mlIP5t4RZqJXTugeodVpUk0lQ0TVNLgbCzi+vUbRrFBov/h9 QAWRdEUl3ReRkECUni3tZyluh4FUy8eJd3acX6+8UL3WKJ9h7MXzZgWCIPGNYcqmL8 OD4M/74rX+a1VqXSXvcMo1glnXuw6ce6hfZg/cs4= 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.10 372/634] watchdog: imx_sc_wdt: Dont disable WDT in suspend Date: Wed, 2 Oct 2024 14:57:52 +0200 Message-ID: <20241002125825.781665317@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241002125811.070689334@linuxfoundation.org> References: <20241002125811.070689334@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-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