OSDN Git Service

watchdog: mtk: support pre-timeout when the bark irq is available
authorWang Qing <wangqing@vivo.com>
Sun, 25 Apr 2021 01:52:06 +0000 (09:52 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 21 Jun 2021 06:49:10 +0000 (08:49 +0200)
commit1bbce7792bd19b95e44fd37db88b98091191e199
tree49f51054207ce4796a845324122bc7e6788e525d
parent4700df05d3848c8ceb92662792d45d938e533f5a
watchdog: mtk: support pre-timeout when the bark irq is available

Use the bark interrupt as the pretimeout notifier if available.

When the watchdog timer expires in dual mode, an interrupt will be
triggered first, then the timing restarts. The reset signal will be
initiated when the timer expires again.

The pretimeout notification shall occur at timeout-sec/2.

V2:
- panic() by default if WATCHDOG_PRETIMEOUT_GOV is not enabled.

V3:
- Modify the pretimeout behavior, manually reset after the pretimeout
- is processed and wait until timeout.

V4:
- Remove pretimeout related processing.
- Add dual mode control separately.

V5:
- Fix some formatting and printing problems.

V6:
- Realize pretimeout processing through dualmode.

V7:
- Add set_pretimeout().

V8/V9:
- Fix some formatting problems.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1619315527-8171-2-git-send-email-wangqing@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/mtk_wdt.c