diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2021-11-08 16:53:28 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-17 01:58:38 +0000 |
commit | 0cfd1836354b47ea0d47e01dd7701f9bdad399f5 (patch) | |
tree | f4e5fc5f12c05cae90a0715031c9b199efc649b4 /power | |
parent | c0129d3ae6ea02ca003776e1da79a72b14c9517e (diff) | |
download | chrome-ec-0cfd1836354b47ea0d47e01dd7701f9bdad399f5.tar.gz |
falconlite: ensure WDT is deasserted when hard shutdown.
There will be two cases when AP has a shutdown request:
AP_EC_SHUTDOWN_REQ:1 AP_EC_WATCHDOG_L:1 -> This is a real shutdown
request.
AP_EC_SHUTDOWN_REQ:1 AP_EC_WATCHDOG_L:0 -> This is a WDT reset, and
AP will handle this reboot, EC should not touch it.
BUG=b:171029078
TEST=EC is able to handle AP's shutdown request.
BRANCH=main
Change-Id: Id89f3bc386dc73225731a96bafae48a55df06e73
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3270227
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Tested-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'power')
-rw-r--r-- | power/falconlite.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/power/falconlite.c b/power/falconlite.c index 087b952e19..d2f8e5952a 100644 --- a/power/falconlite.c +++ b/power/falconlite.c @@ -61,6 +61,11 @@ const struct power_signal_info power_signal_list[] = { POWER_SIGNAL_ACTIVE_LOW, "AP_SHUTDOWN_REQ" }, + [FCL_AP_WATCHDOG] = { + GPIO_AP_EC_WATCHDOG_L, + POWER_SIGNAL_ACTIVE_LOW, + "AP_WDT" + }, [FCL_PG_S5] = { GPIO_PG_S5_PWR_OD, POWER_SIGNAL_ACTIVE_HIGH, @@ -229,9 +234,11 @@ void chipset_reset_request_interrupt(enum gpio_signal signal) * When AP_SHUTDOWN_REQ_L is asserted, we have to check if * there is a AP_EC_WARM_RST_REQ interrupt prior to this one, * and that would be a reboot request, rather than a - * shutdown. + * shutdown. In the meantime, the WDT should not be asserted, + * or this is a WDT reset, which will be handled by AP. */ - if (!gpio_get_level(signal) && !want_reboot) { + if (gpio_get_level(GPIO_AP_EC_WATCHDOG_L) && + !gpio_get_level(signal) && !want_reboot) { CPRINTS("AP wants shutdown"); ap_shutdown = 1; } |