Kexec maybe need more time than timeout of wdt(sbsa)
which will reset the system.
So it is necessary to add shutdown hook to disable the
wdt when run kexec.
Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
return 0;
}
+static void sbsa_gwdt_shutdown(struct platform_device *pdev)
+{
+ struct sbsa_gwdt *gwdt;
+
+ gwdt = platform_get_drvdata(pdev);
+ sbsa_gwdt_stop(&gwdt->wdd);
+}
+
/* Disable watchdog if it is active during suspend */
static int __maybe_unused sbsa_gwdt_suspend(struct device *dev)
{
.pm = &sbsa_gwdt_pm_ops,
.of_match_table = sbsa_gwdt_of_match,
},
+ .shutdown = sbsa_gwdt_shutdown,
.probe = sbsa_gwdt_probe,
.id_table = sbsa_gwdt_pdev_match,
};