diff options
author | Vic Yang <victoryang@chromium.org> | 2014-06-10 14:04:20 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-19 03:25:08 +0000 |
commit | 6c8e451ff01d046a953ee99a2911b46732361b2b (patch) | |
tree | 53b666bb98d03f0f10d9616fd7c851eb2c5d3392 /Makefile | |
parent | 635a07ddadc47b649fa24bee6f94c65295eb844d (diff) | |
download | chrome-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 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -53,6 +53,14 @@ _flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dM -Ichip/$(CHIP) -Iboard/$(BOARD) \ $(foreach c,$(_tsk_cfg) $(_flag_cfg),$(eval $(c)=y)) +ifneq "$(CONFIG_COMMON_RUNTIME)" "y" + _irq_list:=$(shell $(CPP) $(CPPFLAGS) -P -Ichip/$(CHIP) -Iboard/$(BOARD) \ + -D"ENABLE_IRQ(x)=EN_IRQ x" -imacros chip/$(CHIP)/registers.h \ + board/$(BOARD)/ec.irqlist | grep "EN_IRQ .*" | cut -c8-) + CPPFLAGS+=$(foreach irq,$(_irq_list),\ + -D"irq_$(irq)_handler_optional=irq_$(irq)_handler") +endif + # Get build configuration from sub-directories # Note that this re-includes the board and chip makefiles include board/$(BOARD)/build.mk |