summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-10-22 15:07:45 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-25 04:26:39 -0700
commit1044e1a5b50dbb0edf35aa178b7422715c0c458d (patch)
tree2a0f3871e1903eb25cddc0ff451e4523473d1261 /util
parenta56ab7d4a3c7e05477f7e489db08de00c30da662 (diff)
downloadchrome-ec-1044e1a5b50dbb0edf35aa178b7422715c0c458d.tar.gz
power/mt8183: Implement watchdog-initiated reset
AP watchdog line can fall in either of 2 cases: - AP asserts watchdog while the AP is on: this is a real AP-initiated reset. - EC asserted GPIO_AP_SYS_RST_L, so the AP is in reset and AP watchdog falls as well. This is _not_ a watchdog reset. We mask these cases by disabling the interrupt just before shutting down the AP, and re-enabling it before starting the AP. Also, take the opportunity to move warm reset code out of board file into generic MT8183 power code, as well as code to enable interrupts. BRANCH=none BUG=b:109900671 TEST=apshutdown => EC understand this is an EC-initiated shutdown TEST=Use test-wd from bug, see that EC detects it is a watchdog. Change-Id: I02037e5be0254fef991ae2459be35e4561e0994c Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1293132 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c
index a053171ac5..bd7725131e 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -718,6 +718,7 @@ static const char *reset_cause_to_str(uint16_t cause)
"reset: debug warm reboot",
"reset: at AP's request",
"reset: during EC initialization",
+ "reset: AP watchdog",
};
BUILD_ASSERT(ARRAY_SIZE(reset_causes) == CHIPSET_RESET_COUNT);