Hi,
I have a problem with Linux not rebooting when the RTC watchdog is enabled in U-Boot. The stmp3xxx_rtc watchdog driver is enabled in Linux and there's a watchdog daemon that triggers the /dev/watchdog device. Everything was working so far and the watchdog rebooted the device after a while if the watchdog daemon was killed. Then I modified U-Boot to enable the watchdog before loading Linux. I had to modify U-Boot to add a driver with the hw_watchdog_init() and hw_watchdog_reset() functions and call the hw_watchdog_init in the board_init() function. The watchdog works fine in U-Boot, but now, Linux doesn't reboot on a reboot command, it gets stuck on : reboot: Restarting system. On a watchdog timeout it just freezes. When I disable the watchdog in U-Boot, everything still works fine.
I tried rewriting the Linux mxs_restart() function in arch/arm/mach-mxs.c to reset the device using the watchdog instead of using the reset chip function and made sure to enable the AUTO_RESTART bit in the RTC_PERSISTENT0 register. It still doesn't reboot..
The board is using a TQMa28 module. Linux kernel is 5.10.19 with some patches applied for the board.
Any help would be appreciated. Thanks!