summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-05-20 16:17:35 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-21 04:12:45 +0000
commit46c6d3dd1b99452ba2ca254114c70afc0f1cc030 (patch)
tree2b535bfeb1efc4eee7c403aa6297ec94e9cfec87
parent98d78db982f8e41278e9cd81eeb6075d2c1cfd1a (diff)
downloadchrome-ec-46c6d3dd1b99452ba2ca254114c70afc0f1cc030.tar.gz
Keyborg: fix a bug in task_wait_event()
The match interrupt is disabled before we actually intend to. Fix it. BUG=None TEST=Build and boot BRANCH=None Change-Id: I8fb171e849809d1e4f35f00bbf6d15c9a8caad74 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/200680 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/keyborg/runtime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/board/keyborg/runtime.c b/board/keyborg/runtime.c
index 89306d85fd..c7c619c46c 100644
--- a/board/keyborg/runtime.c
+++ b/board/keyborg/runtime.c
@@ -101,11 +101,10 @@ uint32_t task_wait_event(int timeout_us)
do {
/* sleep until next interrupt */
asm volatile("wfi");
-
- STM32_TIM_DIER(2) = 0; /* disable match interrupt */
- evt = last_event;
- last_event = 0;
} while (need_wfi);
+ STM32_TIM_DIER(2) = 0; /* disable match interrupt */
+ evt = last_event;
+ last_event = 0;
return evt;
}