summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-06-08 22:12:13 -0700
committerCommit Bot <commit-bot@chromium.org>2020-07-22 00:24:41 +0000
commit27ee378bb78a299a0983379be83eb6d55860b4ae (patch)
tree9e7aad7c30504ddc87a94101c035f6e8d1bd576c /common
parentd3ba44c0619ec84fc5a3615c4fa441ee44e0d645 (diff)
downloadchrome-ec-27ee378bb78a299a0983379be83eb6d55860b4ae.tar.gz
power: Clear AP_IDLE when waking up by PB or LID
Currently, AP_IDLE is cleared when EC wakes up by the power button or the lid open. This patch extends the logic from CONFIG_EXTPOWER_GPIO to CONFIG_EXTPOWER so that the bug (chromium:1073960) can be also fixed on the boards using non-GPIO method for extpower_is_present. Tested as follows on Trembyle: 1. Put DUT in hibernation. 2. Wake up DUT and observe: a. When waking up by power button, AP is turned on. b. When waking up by lid open, AP is turned on. c. When waking up by AC, AP is left idle. BUG=b:157077589, chromium:1073960, b:159350276 BRANCH=none TEST=See above. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I944aaac036ce58659e81b7021e52a3291f31e951 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283946 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/vboot/efs2.c12
1 files changed, 0 insertions, 12 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())