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>
This commit is contained in:
Shawn Nematbakhsh
2015-06-12 16:13:32 -07:00
committed by ChromeOS Commit Bot
parent e22b900c6e
commit cb16cf9b65

View File

@@ -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)