summaryrefslogtreecommitdiff
path: root/board/zinger/runtime.c
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-06-10 14:04:20 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-19 03:25:08 +0000
commit6c8e451ff01d046a953ee99a2911b46732361b2b (patch)
tree53b666bb98d03f0f10d9616fd7c851eb2c5d3392 /board/zinger/runtime.c
parent635a07ddadc47b649fa24bee6f94c65295eb844d (diff)
downloadchrome-ec-6c8e451ff01d046a953ee99a2911b46732361b2b.tar.gz
IRQ list support for enabling specific IRQs without common runtime
This adds back DECLARE_IRQ() support when building without common runtime. With this, we can enable only a subset of IRQs and avoid linking in other unused IRQ handlers. Note that after this change, all boards without common runtime need to have a ec.irqlist file. BUG=None TEST=Build Keyborg and check it still works. TEST=make buildall BRANCH=None Change-Id: If68062a803b9a78f383027a1625cf99eb3370d3f Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/203264 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger/runtime.c')
-rw-r--r--board/zinger/runtime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c
index 0598bd93fd..e418031aed 100644
--- a/board/zinger/runtime.c
+++ b/board/zinger/runtime.c
@@ -7,8 +7,8 @@
#include "common.h"
#include "cpu.h"
#include "debug.h"
-#include "irq_handler.h"
#include "registers.h"
+#include "task.h"
#include "timer.h"
#include "util.h"
@@ -52,12 +52,13 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
return 0;
}
-void IRQ_HANDLER(STM32_IRQ_TIM2)(void)
+void tim2_interrupt(void)
{
STM32_TIM_DIER(2) = 0; /* disable match interrupt */
task_clear_pending_irq(STM32_IRQ_TIM2);
last_event = 1 << 29 /* task event wake */;
}
+DECLARE_IRQ(STM32_IRQ_TIM2, tim2_interrupt, 1);
uint32_t task_wait_event(int timeout_us)
{