From cb16cf9b65e37fe0554478e17a324c6e4e436875 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Fri, 12 Jun 2015 16:13:32 -0700 Subject: [PATCH] skylake: Properly handle apshutdown when AP is already shutdown If the AP is already shutdown, apshutdown would previously power the AP up with a power press. Fix this by making sure we're not already in G3 before triggering the power press. BUG=chrome-os-partner:40677 TEST=Run 'apshutdown' on glados while in G3, verify that AP does not power up. BRANCH=None Change-Id: I8b898b034dcf40f0acef4fb6098af0aebba566c6 Signed-off-by: Shawn Nematbakhsh Reviewed-on: https://chromium-review.googlesource.com/277400 Reviewed-by: Alec Berg --- power/skylake.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/power/skylake.c b/power/skylake.c index 2e5634ef6e..515c77697e 100644 --- a/power/skylake.c +++ b/power/skylake.c @@ -52,8 +52,10 @@ void chipset_force_shutdown(void) * Consider reducing the latency here by changing the power off * hold time on the PMIC. */ - forcing_shutdown = 1; - power_button_pch_press(); + if (!chipset_in_state(CHIPSET_STATE_HARD_OFF)) { + forcing_shutdown = 1; + power_button_pch_press(); + } } void chipset_force_g3(void)