diff options
author | Jett Rink <jettrink@chromium.org> | 2018-03-29 11:02:00 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-29 19:51:47 -0700 |
commit | 109921e29d60c2eafa46147b296db558887be9a9 (patch) | |
tree | 56993eee341b40598cc794871f86af398a4b40d4 /chip | |
parent | e0b7137f47bb6902a51290c97fabeadf21276d6c (diff) | |
download | chrome-ec-109921e29d60c2eafa46147b296db558887be9a9.tar.gz |
ite: exclude keyboard interrupts if no keyboard task
When building the `tests` target for a specific board that uses the
ite EC chip, it will fail to find the lpc_kbc_obe_interrupt function.
Adding #define around code similar to npcx set up.
This is needed because the unibuild system uses the tests target when
compiling chromeos-ec.
BRANCH=none
BUG=b:77274422
TEST=Can now successfully `make BOARD=bip tests`
Change-Id: I971aebe1667eb90e8ccccbe6047c5aa959c76c4b
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/986634
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/it83xx/intc.c | 2 | ||||
-rw-r--r-- | chip/it83xx/intc.h | 7 | ||||
-rw-r--r-- | chip/it83xx/lpc.c | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/chip/it83xx/intc.c b/chip/it83xx/intc.c index a2fd06dea4..2becd74b60 100644 --- a/chip/it83xx/intc.c +++ b/chip/it83xx/intc.c @@ -47,7 +47,7 @@ void intc_cpu_int_group_5(void) int intc_group_5 = intc_get_ec_int(); switch (intc_group_5) { -#ifdef CONFIG_LPC +#if defined(CONFIG_LPC) && defined(HAS_TASK_KEYPROTO) case IT83XX_IRQ_KBC_OUT: lpc_kbc_obe_interrupt(); break; diff --git a/chip/it83xx/intc.h b/chip/it83xx/intc.h index 508b7e0f3b..ed2590c91a 100644 --- a/chip/it83xx/intc.h +++ b/chip/it83xx/intc.h @@ -9,8 +9,6 @@ #define __CROS_EC_INTC_H int intc_get_ec_int(void); -void lpc_kbc_ibf_interrupt(void); -void lpc_kbc_obe_interrupt(void); void pm1_ibf_interrupt(void); void pm2_ibf_interrupt(void); void pm3_ibf_interrupt(void); @@ -27,4 +25,9 @@ void espi_interrupt(void); void espi_vw_interrupt(void); void espi_init(void); +#ifdef HAS_TASK_KEYPROTO +void lpc_kbc_ibf_interrupt(void); +void lpc_kbc_obe_interrupt(void); +#endif + #endif /* __CROS_EC_INTC_H */ diff --git a/chip/it83xx/lpc.c b/chip/it83xx/lpc.c index bde0ebf0c1..eb46cbaa29 100644 --- a/chip/it83xx/lpc.c +++ b/chip/it83xx/lpc.c @@ -372,6 +372,7 @@ int lpc_get_pltrst_asserted(void) } #endif +#ifdef HAS_TASK_KEYPROTO /* KBC and PMC control modules */ void lpc_kbc_ibf_interrupt(void) { @@ -385,9 +386,7 @@ void lpc_kbc_ibf_interrupt(void) task_clear_pending_irq(IT83XX_IRQ_KBC_IN); -#ifdef HAS_TASK_KEYPROTO task_wake(TASK_ID_KEYPROTO); -#endif } void lpc_kbc_obe_interrupt(void) @@ -404,10 +403,9 @@ void lpc_kbc_obe_interrupt(void) } #endif -#ifdef HAS_TASK_KEYPROTO task_wake(TASK_ID_KEYPROTO); -#endif } +#endif /* HAS_TASK_KEYPROTO */ void pm1_ibf_interrupt(void) { |