diff options
| author | Wanming Gao <wanming.gao@mediatek.com> | 2026-08-27 17:26:12 +0800 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-08-30 14:41:33 -0700 |
| commit | 42b33d917a759bfc8c1bd73e4f4939eca7f1fe12 (patch) | |
| tree | eaaafdef367adce0c1fa7ca309a2c995c15a40bf /scripts/Makefile.thinlto | |
| parent | 4e2583a67c0d3978a160e830923938527caf6600 (diff) | |
| download | linux-next-42b33d917a759bfc8c1bd73e4f4939eca7f1fe12.tar.gz linux-next-42b33d917a759bfc8c1bd73e4f4939eca7f1fe12.zip | |
watchdog: mediatek: acknowledge pretimeout interrupt
The MediaTek watchdog pretimeout interrupt is level-triggered and does
not have a separate acknowledge register. The interrupt is cleared by
changing WDT_MODE_IRQ_LEVEL_EN and then restoring it to its original
state. Without this transition, the interrupt may remain asserted and
cause an interrupt storm.
After changing WDT_MODE_IRQ_LEVEL_EN, wait 70 us before restoring it.
This is longer than two 32 kHz watchdog clock cycles, allowing the
level change to propagate across the clock domain.
WDT_MODE is also updated by the watchdog start, stop, and pretimeout
operations. Protect its read-modify-write sequences and the complete
IRQ acknowledge sequence with the watchdog spinlock so that concurrent
updates cannot overwrite the temporary IRQ level state.
Signed-off-by: Wanming Gao <wanming.gao@mediatek.com>
Tested-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260827092616.2724197-1-wanming.gao@mediatek.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
