summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2020-05-06 07:42:23 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-06 23:22:52 +0000
commite033acbaf98d86eb3955bc5e1fd9f2268e2ecda7 (patch)
tree2038ffa7440def64904f828487b4dae39bcb7f36
parent2e81696848f2f497fe421756bcd1cd640b06856b (diff)
downloadchrome-ec-e033acbaf98d86eb3955bc5e1fd9f2268e2ecda7.tar.gz
power: Boot on wake from hibernation for non-EFS2 boards
CONFIG_BOOT_ON_HIBERNATE_WAKE allows boards to choose either to get PD power or to keep the consistent behavior between S5 and hibernation. EFS2 boards can get both. This patch replaces the macro with CONFIG_VBOOT_EFS2 so that non EFS2 boards automatically choose the option (to boot on wake from hibernation). Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=chromium:1073960 BRANCH=none TEST=Verified on Zork AP stays off after wake up from hibernation. Change-Id: I1707153357777db082ae64f86f8303f0e408b1a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2184545 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--include/config.h9
-rw-r--r--power/common.c3
2 files changed, 1 insertions, 11 deletions
diff --git a/include/config.h b/include/config.h
index b121148f88..e9119374b4 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2112,15 +2112,6 @@
#undef CONFIG_HIBERNATE_WAKEUP_PINS
/*
- * Boot after waking up from hibernation.
- *
- * Note enabling this will allow boards to be charged by PD power but create
- * the inconsistent behavior between hibernation and S5 (chromium:1073960).
- * Enable EFS2 to get both PD charging and the consistency.
- */
-#undef CONFIG_BOOT_ON_HIBERNATE_WAKE
-
-/*
* If defined, chip hibernation is used. Your board needs to define wake-up
* signals. Undefine this to use board hibernation capability.
*/
diff --git a/power/common.c b/power/common.c
index 94f2623487..6c25463bcd 100644
--- a/power/common.c
+++ b/power/common.c
@@ -343,8 +343,7 @@ 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_BOOT_ON_HIBERNATE_WAKE)) {
+ if (IS_ENABLED(CONFIG_VBOOT_EFS2)) {
uint32_t reset_flags;
reset_flags = chip_read_reset_flags() |
EC_RESET_FLAG_AP_OFF;