summaryrefslogtreecommitdiff
path: root/include/task.h
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 /include/task.h
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 'include/task.h')
-rw-r--r--include/task.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/task.h b/include/task.h
index 3455dfc097..63986627c5 100644
--- a/include/task.h
+++ b/include/task.h
@@ -238,8 +238,14 @@ struct irq_priority {
#ifdef CONFIG_COMMON_RUNTIME
#include "irq_handler.h"
#else
-#define DECLARE_IRQ(irq, routine, priority)
#define IRQ_HANDLER(irqname) CONCAT3(irq_, irqname, _handler)
+#define IRQ_HANDLER_OPT(irqname) CONCAT3(irq_, irqname, _handler_optional)
+#define DECLARE_IRQ(irq, routine, priority) \
+ void IRQ_HANDLER_OPT(irq)(void) __attribute__((alias(#routine)));
+
+/* Include ec.irqlist here for compilation dependency */
+#define ENABLE_IRQ(x)
+#include "ec.irqlist"
#endif
#endif /* __CROS_EC_TASK_H */