summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-06-12 16:13:32 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-13 02:53:32 +0000
commitcb16cf9b65e37fe0554478e17a324c6e4e436875 (patch)
tree1ae96e1c7af37fcd601f8d81e935c140bfacbd5d /power
parente22b900c6e3f477871a4b0535e23716e69e0d35a (diff)
downloadchrome-ec-cb16cf9b65e37fe0554478e17a324c6e4e436875.tar.gz
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 <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/277400 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/skylake.c6
1 files 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)