summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-05-22 13:30:59 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-23 04:14:40 +0000
commit225f7add0e5ae94bf80ec95003202793c89a707d (patch)
tree573228e93e0a9d4217844d6bc26102f22337b373
parent50b713567e7fef1c93f809ca2f82e919745a1aec (diff)
downloadchrome-ec-225f7add0e5ae94bf80ec95003202793c89a707d.tar.gz
x86/PB: Clear AP_OFF after PB is initialized
This patch clears EC_RESET_FLAG_AP_OFF after the wish is reflected to the power button state. It'll prevent the flag from being carried over to RW. BUG=b:154778457 BRANCH=none TEST=Verify test_that suite:faft_bios passes. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I481b986abee66d82a40998154b0536c499ece709 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213731 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--common/power_button_x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/power_button_x86.c b/common/power_button_x86.c
index fbb027870e..0d2d5e5b71 100644
--- a/common/power_button_x86.c
+++ b/common/power_button_x86.c
@@ -232,6 +232,8 @@ static void set_initial_pwrbtn_state(void)
return;
} else if ((reset_flags & EC_RESET_FLAG_AP_OFF) ||
(keyboard_scan_get_boot_keys() == BOOT_KEY_DOWN_ARROW)) {
+ /* Clear AP_OFF so that it won't be carried over to RW. */
+ system_clear_reset_flags(EC_RESET_FLAG_AP_OFF);
/*
* Reset triggered by keyboard-controlled reset, and down-arrow
* was held down. Or reset flags request AP off.