From 9fa9307567fd03ad059723ac64bbbb796469c865 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Tue, 6 Jan 2015 16:12:07 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/238918 Reviewed-by: Vincent Palatin Reviewed-by: Alec Berg Tested-by: Vic Yang Commit-Queue: Vic Yang --- power/tegra.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'power/tegra.c') diff --git a/power/tegra.c b/power/tegra.c index 8b3c3c766a..5efd41e61d 100644 --- a/power/tegra.c +++ b/power/tegra.c @@ -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 */ -- cgit v1.2.1