summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/vboot/efs2.c12
-rw-r--r--power/common.c5
2 files changed, 2 insertions, 15 deletions
diff --git a/common/vboot/efs2.c b/common/vboot/efs2.c
index 963d10a4b2..e608fd5841 100644
--- a/common/vboot/efs2.c
+++ b/common/vboot/efs2.c
@@ -253,18 +253,6 @@ void vboot_main(void)
return;
}
- if (IS_ENABLED(CONFIG_HIBERNATE)
- && IS_ENABLED(CONFIG_EXTPOWER_GPIO)
- && !gpio_get_level(GPIO_AC_PRESENT)) {
- /*
- * EC doesn't hibernate from G3 when AC is present. Thus if AC
- * is not present here, it implies we woke up by power button or
- * by lid. Clear AP_IDLE to avoid interfering with the AP boot.
- */
- CPRINTS("Clear AP_IDLE, assuming wake-up by PB or LID");
- system_clear_reset_flags(EC_RESET_FLAG_AP_IDLE);
- }
-
if (system_is_manual_recovery() ||
(system_get_reset_flags() & EC_RESET_FLAG_STAY_IN_RO)) {
if (system_is_manual_recovery())
diff --git a/power/common.c b/power/common.c
index 0cdabca0fa..2dab633ef1 100644
--- a/power/common.c
+++ b/power/common.c
@@ -440,11 +440,10 @@ static enum power_state power_common_state(enum power_state state)
&target, now)) {
case CRITICAL_SHUTDOWN_HIBERNATE:
CPRINTS("Hibernate due to G3 idle");
- if (IS_ENABLED(CONFIG_EXTPOWER_GPIO) &&
- IS_ENABLED(CONFIG_VBOOT_EFS2)) {
+ if (IS_ENABLED(CONFIG_VBOOT_EFS2)) {
uint32_t reset_flags;
reset_flags = chip_read_reset_flags() |
- EC_RESET_FLAG_AP_IDLE;
+ EC_RESET_FLAG_AP_OFF;
chip_save_reset_flags(reset_flags);
}
system_hibernate(0, 0);