summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorLouis Yung-Chieh Lo <yjlou@chromium.org>2014-05-08 14:17:15 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-09 08:26:22 +0000
commitb5f3455a98ac2efad01228c01d25b05e9bddf52a (patch)
tree0686da7117d468517d461a19bdca66c178badd9f /power
parent863f661c6f6235525bcffc2b4b50a270128922fa (diff)
downloadchrome-ec-b5f3455a98ac2efad01228c01d25b05e9bddf52a.tar.gz
tegra: don't set auto_power_on if SYSJUMP
The auto_power_on is set 1 unexpectedly while EC jumps. This has a side effect that would turn on the AP unexpectedly after "power off". See comment 43 of issue 28249 BUG=chrome-os-partner:28249 BRANCH=tot,nyan TEST=on nyan: > reboot > sysinfo // If EC is in RO, "sysjump RW" > power off // The AP keeps off. Change-Id: I3c06e99383c06af7cd6c17dd65040e20f06d8e73 Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/198941
Diffstat (limited to 'power')
-rw-r--r--power/tegra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/power/tegra.c b/power/tegra.c
index 1d7b24cb28..dac1d2f475 100644
--- a/power/tegra.c
+++ b/power/tegra.c
@@ -233,12 +233,13 @@ DECLARE_HOOK(HOOK_LID_CHANGE, tegra_lid_event, HOOK_PRIO_DEFAULT);
enum power_state power_chipset_init(void)
{
int init_power_state;
+ uint32_t reset_flags = system_get_reset_flags();
/*
* Force the AP shutdown unless we are doing SYSJUMP. Otherwise,
* the AP could stay in strange state.
*/
- if (!(system_get_reset_flags() & RESET_FLAG_SYSJUMP)) {
+ if (!(reset_flags & RESET_FLAG_SYSJUMP)) {
CPRINTF("[%T not sysjump; forcing AP shutdown]\n");
chipset_turn_off_power_rails();
@@ -258,7 +259,8 @@ enum power_state power_chipset_init(void)
}
/* Leave power off only if requested by reset flags */
- if (!(system_get_reset_flags() & RESET_FLAG_AP_OFF)) {
+ if (!(reset_flags & RESET_FLAG_AP_OFF) &&
+ !(reset_flags & RESET_FLAG_SYSJUMP)) {
CPRINTF("[%T auto_power_on is set due to reset_flag 0x%x]\n",
system_get_reset_flags());
auto_power_on = 1;