From 7e2d3cd3a6ec36e33a4a175e9343a23140b75af5 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 15 Nov 2017 22:25:37 -0800 Subject: skylake: Check for hard and soft off in chipset_force_shutdown Intention of chipset_force_shutdown is to power off the AP by simulating power button press until it results in power button override and shuts down AP. However, if AP is already in hard or soft off conditions (i.e. G3, S5G3, G3S5 or S5) then AP is already off, and simulating power button press results in charge_prevent_power_on from incorrectly assuming that the power button is pressed by user. Thus, check if the system is in soft or hard off before shutting it down. BUG=b:65864825 BRANCH=None TEST=Verified that apshutdown still works fine from EC console on soraka. Change-Id: Id892e5b2c8c1e4ce0bad95a70ea6a3ed547a7047 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/774298 Reviewed-by: Aaron Durbin Reviewed-by: Shawn N --- power/skylake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power/skylake.c b/power/skylake.c index e2a072c9df..9cad5baaf4 100644 --- a/power/skylake.c +++ b/power/skylake.c @@ -34,7 +34,7 @@ void chipset_force_shutdown(void) * Consider reducing the latency here by changing the power off * hold time on the PMIC. */ - if (!chipset_in_state(CHIPSET_STATE_HARD_OFF)) { + if (!chipset_in_state(CHIPSET_STATE_ANY_OFF)) { forcing_shutdown = 1; power_button_pch_press(); } -- cgit v1.2.1