diff options
author | Furquan Shaikh <furquan@chromium.org> | 2018-02-09 12:55:35 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-12 18:59:36 -0800 |
commit | c7f6e2a80fcdd9178abec6faaa4d356dc4cab1a4 (patch) | |
tree | d692176ee54512adc1145dc6d7e478efcf64151d | |
parent | 242cd4e3ad9b8dfa793769523fc5be6e5dd0fed7 (diff) | |
download | chrome-ec-c7f6e2a80fcdd9178abec6faaa4d356dc4cab1a4.tar.gz |
power_button_x86: Honor power_button_pulse setting on sysjump
On sysjump, if power button is held down, first check
power_button_pulse_enabled setting to decide if powerbtn to pch should
be asserted. This is important to prevent accidental shutdowns when
user is attempting to do an EC reset with Vup+Pwr held down.
BUG=b:73129177
BRANCH=None
TEST=Verified following:
1. Reset EC by holding Vup+Pwr.
2. Keep holding Vup+Pwr until AP reaches depthcharge.
3. Ensure that AP does not shutdown.
Change-Id: I0375fc8e8baabb40807dfdc6d4c9fa70c9b3b87d
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/912364
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | common/power_button_x86.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/power_button_x86.c b/common/power_button_x86.c index 19870e0e49..79fdeea82f 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -204,9 +204,14 @@ static void set_initial_pwrbtn_state(void) chipset_in_state(CHIPSET_STATE_ON)) { /* * Jumped to this image while the chipset was already on, so - * simply reflect the actual power button state. + * simply reflect the actual power button state unless power + * button pulse is disabled. If power button SMI pulse is + * enabled, then it should be honored, else setting power + * button to PCH could lead to x86 platform shutting down. If + * power button is still held by the time control reaches + * state_machine(), it would take the appropriate action there. */ - if (power_button_is_pressed()) { + if (power_button_is_pressed() && power_button_pulse_enabled) { CPRINTS("PB init-jumped-held"); set_pwrbtn_to_pch(0, 0); } else { |