imx8mm: imx2_wdt boot status never indicates watchdog reboot

cancel
Showing results for 
Search instead for 
Did you mean: 

imx8mm: imx2_wdt boot status never indicates watchdog reboot

126 Views
DonaldC
Contributor I

Top of the morning,

I have found that triggering a watchdog based reset (by starting it and failing to pet it, for example by enabling the watchdog in systemd and then closing the file handle to the watchdog) is not reported on the following boot in boot_status.

I adjusted the imx2_wdt.c driver in the kernel to remove userspace from consideration, and even then never see CARDRESET being reported:

+++ b/drivers/watchdog/imx2_wdt.c
@@ -304,6 +304,11 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
regmap_read(wdev->regmap, IMX2_WDT_WRSR, &val);
wdog->bootstatus = val & IMX2_WDT_WRSR_TOUT ? WDIOF_CARDRESET : 0;

+ if (val & IMX2_WDT_WRSR_TOUT)
+ dev_info(dev, "watchdog forced system reboot\n");
+ else
+ dev_info(dev, "watchdog did not force system reboot\n");
+
wdev->ext_reset = of_property_read_bool(dev->of_node,
"fsl,ext-reset-output");
platform_set_drvdata(pdev, wdog);

Our kernel is currently based on 5.10.35-2.0.0

Labels (1)
0 Kudos
0 Replies