linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Suspending i.MX watchdog in WAIT mode
@ 2022-09-21 12:46 Andrej Picej
  2022-09-21 12:46 ` [RFC PATCH 1/1] watchdog: imx2_wdg: suspend " Andrej Picej
  2022-09-21 14:18 ` [RFC PATCH 0/1] Suspending i.MX " Guenter Roeck
  0 siblings, 2 replies; 9+ messages in thread
From: Andrej Picej @ 2022-09-21 12:46 UTC (permalink / raw)
  To: linux-watchdog; +Cc: wim, linux, shawnguo, s.hauer, kernel, festevam, linux-imx

Hi all,

we are using i.MX6UL with its watchdog WDOG1 and kernel 5.15.62. It was
discovered that the watchdog triggers reset when the device is put into
'Suspend-To-Idle' (WAIT) state.

i.MX6UL watchdog has a WDW (Watchdog Disable for Wait) bit in WCR
(Watchdog Control Register) which can put the watchdog in suspend when
the device is put to WAIT mode. Similarly, WDZST bit is already set in
imx2_wdt driver by default, which suspends the watchdog in STOP and DOZE
modes.

This RFC patch suspends watchdog when the device is in WAIT mode, which
fixes our problem. During development, we noticed some reports where
setting WDW bit caused inconsistent timeout events or inability of
watchdog to reset the board. We didn't have these problems but I am
curious if there is a case where device is put into WAIT mode and
watchdog should be enabled?

Maybe for cases where watchdog is used for WAIT mode supervision? So
basically to reset the system if device doesn't exit WAIT mode on its
own?

The problem can be recreated with:

	imx6ul-dev:~# echo freeze > /sys/power/state 
	[  101.093336] PM: suspend entry (s2idle)
	[  101.097785] Filesystems sync: 0.000 seconds
	[  101.122295] Freezing user space processes ... (elapsed 0.001 seconds) done.
	[  101.130637] OOM killer disabled.
	[  101.133998] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
	[  101.142941] printk: Suspending console(s) (use no_console_suspend to debug)
	...
Device resets after watchdog timeout expires! ~105s

Thank you for your feedback.

Best regards,
Andrej

Andrej Picej (1):
  watchdog: imx2_wdg: suspend watchdog in WAIT mode

 drivers/watchdog/imx2_wdt.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-03 11:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 12:46 [RFC PATCH 0/1] Suspending i.MX watchdog in WAIT mode Andrej Picej
2022-09-21 12:46 ` [RFC PATCH 1/1] watchdog: imx2_wdg: suspend " Andrej Picej
2022-09-21 14:18 ` [RFC PATCH 0/1] Suspending i.MX " Guenter Roeck
2022-09-22  7:17   ` Andrej Picej
2022-09-22 14:56     ` Guenter Roeck
2022-09-23  7:27       ` Andrej Picej
2022-09-23 13:48         ` Guenter Roeck
2022-09-26  7:36           ` Andrej Picej
2022-10-03 11:36             ` Andrej Picej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).