summaryrefslogtreecommitdiff
path: root/chip/it83xx/clock.c
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2020-03-23 13:38:12 +0800
committerCommit Bot <commit-bot@chromium.org>2020-03-24 15:57:03 +0000
commitced7886d72de35f761d4e4e731aaae9efba98b90 (patch)
treee5adc05d031201b1f2a482969943914ccf61fdf8 /chip/it83xx/clock.c
parent5b7ba935f2d192c524be8ec6932e25ee9668d0d6 (diff)
downloadchrome-ec-ced7886d72de35f761d4e4e731aaae9efba98b90.tar.gz
it8xxx2: wake up CPU if an interrupt is pending in idle task
BUG=b:142029177 BRANCH=none TEST=In idle task, EC does not get stuck. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I9f3c0e3b58e68d60b1218338603a5f2a4bc5eb5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2100055 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/it83xx/clock.c')
-rw-r--r--chip/it83xx/clock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/chip/it83xx/clock.c b/chip/it83xx/clock.c
index 7684c48457..b0f3b09d01 100644
--- a/chip/it83xx/clock.c
+++ b/chip/it83xx/clock.c
@@ -459,11 +459,13 @@ void clock_cpu_standby(void)
if (IS_ENABLED(CHIP_CORE_NDS32)) {
asm("standby wake_grant");
} else if (IS_ENABLED(CHIP_CORE_RISCV)) {
- /*
- * TODO(b:142029177): we have to enable interrupts before
- * standby instruction on IT8xxx2 series.
- */
- interrupt_enable();
+ if (!IS_ENABLED(IT83XX_RISCV_WAKEUP_CPU_WITHOUT_INT_ENABLED))
+ /*
+ * we have to enable interrupts before
+ * standby instruction on IT83202 bx version.
+ */
+ interrupt_enable();
+
asm("wfi");
}
}