summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-08-24 13:23:26 -0700
committerGerrit <chrome-bot@google.com>2012-08-24 18:00:29 -0700
commit3799dcff81be83fdfcc4034c6657f8d4974800fc (patch)
tree8329e30a5fc8a281c1399da86984d1054ab438a2
parent343df7227722874d74928404604d21c560d2f426 (diff)
downloadchrome-ec-3799dcff81be83fdfcc4034c6657f8d4974800fc.tar.gz
stm32: fix AP auto power on
The logic introduced by CL 28139 was incorrect (ie it just sets to 0 the auto_power_on variable which is already 0) For software sync, we always want to power the AP. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:13126 TEST=on Snow, cold reset the EC and see the AP firmware booting. in U-Boot console, type "mbkp reboot cold" and see the AP rebooting instead of shutting down. BRANCH=snow Change-Id: Ib88f75a8b159015df708c041cdc14153fe8736a9 Reviewed-on: https://gerrit.chromium.org/gerrit/31370 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/gaia_power.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/gaia_power.c b/common/gaia_power.c
index 28e22808c0..aae1bd35b7 100644
--- a/common/gaia_power.c
+++ b/common/gaia_power.c
@@ -250,9 +250,9 @@ int gaia_power_init(void)
gpio_enable_interrupt(GPIO_SOC1V8_XPSHOLD);
gpio_enable_interrupt(GPIO_SUSPEND_L);
- /* Leave power off if requested by reset flags */
- if (system_get_reset_flags() & RESET_FLAG_AP_OFF)
- auto_power_on = 0;
+ /* Leave power off only if requested by reset flags */
+ if (!(system_get_reset_flags() & RESET_FLAG_AP_OFF))
+ auto_power_on = 1;
/* Auto power on if the recovery combination was pressed */
if (keyboard_scan_recovery_pressed())