Skip to content

Commit 2d9d6d3

Browse files
Jonas BlixtWim Van Sebroeck
authored andcommitted
watchdog: imx_sc_wdt: Don't disable WDT in suspend
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 <[email protected]> CC: Anson Huang <[email protected]> Fixes: 986857a ("watchdog: imx_sc: Add i.MX system controller watchdog support") Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 1f87c57 commit 2d9d6d3

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

drivers/watchdog/imx_sc_wdt.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -216,29 +216,6 @@ static int imx_sc_wdt_probe(struct platform_device *pdev)
216216
return devm_watchdog_register_device(dev, wdog);
217217
}
218218

219-
static int __maybe_unused imx_sc_wdt_suspend(struct device *dev)
220-
{
221-
struct imx_sc_wdt_device *imx_sc_wdd = dev_get_drvdata(dev);
222-
223-
if (watchdog_active(&imx_sc_wdd->wdd))
224-
imx_sc_wdt_stop(&imx_sc_wdd->wdd);
225-
226-
return 0;
227-
}
228-
229-
static int __maybe_unused imx_sc_wdt_resume(struct device *dev)
230-
{
231-
struct imx_sc_wdt_device *imx_sc_wdd = dev_get_drvdata(dev);
232-
233-
if (watchdog_active(&imx_sc_wdd->wdd))
234-
imx_sc_wdt_start(&imx_sc_wdd->wdd);
235-
236-
return 0;
237-
}
238-
239-
static SIMPLE_DEV_PM_OPS(imx_sc_wdt_pm_ops,
240-
imx_sc_wdt_suspend, imx_sc_wdt_resume);
241-
242219
static const struct of_device_id imx_sc_wdt_dt_ids[] = {
243220
{ .compatible = "fsl,imx-sc-wdt", },
244221
{ /* sentinel */ }
@@ -250,7 +227,6 @@ static struct platform_driver imx_sc_wdt_driver = {
250227
.driver = {
251228
.name = "imx-sc-wdt",
252229
.of_match_table = imx_sc_wdt_dt_ids,
253-
.pm = &imx_sc_wdt_pm_ops,
254230
},
255231
};
256232
module_platform_driver(imx_sc_wdt_driver);

0 commit comments

Comments
 (0)