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>
This commit is contained in:
Vincent Palatin
2012-08-24 13:23:26 -07:00
committed by Gerrit
parent 343df72277
commit 3799dcff81

View File

@@ -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())