summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2022-08-10 14:18:13 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-21 03:55:32 +0000
commit918adbbd6373a7ee5967182fd4f8d58c47eeed15 (patch)
tree8c5febd6b7a0f68f86189edabef96b8f63a25ced
parente10f92f75e8745dfd59f09a127b5b9dcb450fdec (diff)
downloadchrome-ec-918adbbd6373a7ee5967182fd4f8d58c47eeed15.tar.gz
mt8186,mt8188: check IN_AP_RST signal when wachdog IRQ raised
Watchdog interrupt is only significant only when AP is on, which means the IN_AP_RST should not be asserted. BUG=b:242012415 TEST=stop daisydog; echo > /dev/watchdog; EC report AP_WACHDOG reset BRANCH=none LOW_COVERAGE_REASON=initial bringup Change-Id: I2af6fc6f61b909a31e542d86a5a43011cdb6afac Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3820873 Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--power/mt8186.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/power/mt8186.c b/power/mt8186.c
index f4f91faa51..ac2866348a 100644
--- a/power/mt8186.c
+++ b/power/mt8186.c
@@ -99,11 +99,8 @@ void chipset_reset_request_interrupt(enum gpio_signal signal)
static void watchdog_interrupt_deferred(void)
{
- /*
- * If this is a real WDT, AP_IN_SLEEP_L should keep high after
- * the WDT interrupt is fired. Otherwise, it's a normal shutdown.
- */
- if (gpio_get_level(GPIO_AP_IN_SLEEP_L))
+ /* If it's a real WDT, it must be in S0. */
+ if (!(power_get_signals() & (IN_AP_RST | IN_SUSPEND_ASSERTED)))
chipset_reset(CHIPSET_RESET_AP_WATCHDOG);
}
DECLARE_DEFERRED(watchdog_interrupt_deferred);