tegra: Preserve sleep mask on sysjump

If we sysjump while the AP is running, the AP_RUN sleep mask should be
preserved. Otherwise, the EC goes into low power idle while the AP is
still up.

BRANCH=Ryu
BUG=chrome-os-partner:34230
TEST=Without this change, bit 0 becomes 0 after a sysjump. With this, it
doesn't.

Change-Id: I55cecff3275402f7974c6078a9c203bafce2a2f9
Signed-off-by: Vic Yang <victoryang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/238918
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
This commit is contained in:
Vic Yang
2015-01-06 16:12:07 -08:00
committed by ChromeOS Commit Bot
parent d16df875f1
commit 9fa9307567

View File

@@ -265,10 +265,13 @@ enum power_state power_chipset_init(void)
init_power_state = POWER_G3;
} else {
/* In the SYSJUMP case, we check if the AP is on */
if (power_get_signals() & IN_XPSHOLD)
if (power_get_signals() & IN_XPSHOLD) {
init_power_state = POWER_S0;
else
disable_sleep(SLEEP_MASK_AP_RUN);
} else {
init_power_state = POWER_G3;
enable_sleep(SLEEP_MASK_AP_RUN);
}
}
/* Leave power off only if requested by reset flags */