From 3799dcff81be83fdfcc4034c6657f8d4974800fc Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Fri, 24 Aug 2012 13:23:26 -0700 Subject: 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 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 Reviewed-by: Randall Spangler Commit-Ready: Vincent Palatin Tested-by: Vincent Palatin --- common/gaia_power.c | 6 +++--- 1 file 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()) -- cgit v1.2.1