diff options
author | Furquan Shaikh <furquan@chromium.org> | 2018-02-09 12:55:35 -0800 |
---|---|---|
committer | Daisuke Nojiri <dnojiri@chromium.org> | 2018-02-19 10:33:13 -0800 |
commit | 55d8fed577d5e5ab09472f55f8e43e631bff49d3 (patch) | |
tree | 67c3080008e88b3c5f137ba7c4f5558033fc1662 | |
parent | d413a74d360d275509a78f3ea129d0b42ed5e070 (diff) | |
download | chrome-ec-55d8fed577d5e5ab09472f55f8e43e631bff49d3.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 { |