diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2020-08-18 16:42:28 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-18 21:47:02 +0000 |
commit | d75d74f27e526d2b6ac4f3ef972cc744d89c14ab (patch) | |
tree | 6b931eb4683c4da6589e321818f8aa0b28bee81b /power/common.c | |
parent | a19da87f1f4aff9d0a20c08b1d2f5ef73957ddb8 (diff) | |
download | chrome-ec-d75d74f27e526d2b6ac4f3ef972cc744d89c14ab.tar.gz |
Revert "system: Clear AP_IDLE when waking up from hibernation by AC"
This reverts commit 4aacf83506fd959d1341e29b664f6e4fe97824cb.
Reason for revert: See chromium:1073960
Original change's description:
> system: Clear AP_IDLE when waking up from hibernation by AC
>
> Currently, AP_IDLE is set when EC is left idle in G3. This makes the AP
> stay off after EC wakes up from hibernation (for any wake-up source).
> This makes a board require another power button press to boot the
> system from hibernation.
>
> This change makes RO clear AP_IDLE unless AC is present. When AC is
> present, EC doesn't hibernate. So, AC presence infers the EC woke
> up from hibernation by AC. That is, if the system wakes up by a power
> button press, AP_IDLE is cleared and AP will be turned on (unless it's
> overwritten by AP_OFF).
>
> 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
> BRANCH=none
> TEST=See above.
>
> Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
> Change-Id: Ie5020bbe50ad489f4e3010820681cc57ff51b941
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2236589
Bug: b:157077589
Bug: chromium:1073960
Change-Id: Id92d0d3657a622338581cb111d3925cbc11bf168
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2363080
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'power/common.c')
-rw-r--r-- | power/common.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |