Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <jonas.blixt@actia.se>
CC: Anson Huang <anson.huang@nxp.com>
Fixes: 986857acbc9a ("watchdog: imx_sc: Add i.MX system controller watchdog support")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240801121845.1465765-1-jonas.blixt@actia.se
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Jonas Blixt and committed by
Wim Van Sebroeck
2d9d6d30 1f87c578

-24
-24
drivers/watchdog/imx_sc_wdt.c
··· 216 216 return devm_watchdog_register_device(dev, wdog); 217 217 } 218 218 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 - 242 219 static const struct of_device_id imx_sc_wdt_dt_ids[] = { 243 220 { .compatible = "fsl,imx-sc-wdt", }, 244 221 { /* sentinel */ } ··· 227 250 .driver = { 228 251 .name = "imx-sc-wdt", 229 252 .of_match_table = imx_sc_wdt_dt_ids, 230 - .pm = &imx_sc_wdt_pm_ops, 231 253 }, 232 254 }; 233 255 module_platform_driver(imx_sc_wdt_driver);