diff options
author | Yilun Lin <yllin@google.com> | 2019-02-25 19:05:32 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-07 20:21:39 -0800 |
commit | 8b1b74c10a87c8477bc65b7be1f6943676bd56bb (patch) | |
tree | 3f2edb77977ee4aeaf0c1cb3da1a4c73769dcf07 /include/config.h | |
parent | 1641ef6a6e12ca4e26764ad0a083fc07a08da96d (diff) | |
download | chrome-ec-8b1b74c10a87c8477bc65b7be1f6943676bd56bb.tar.gz |
mkbp_event,include/config.h: Clarify MKBP delivery method.
Now we have two MKBP delivery methods:
1. define CONFIG_MKBP_USE_HOST_EVENT to notify via host event
2. undef CONFIG_MKBP_USE_HOST_EVENT to notify via GPIO interrupt
It may become more complicated if new notification methods introduced.
e.g.: mt_scp uses IPI, rather than host event and GPIO interrupt.
This CL does:
1. add CONFIG_MKBP_USE_GPIO to explicilty declare that MKBP event are
sent via GPIO interrupt.
2. CONFIG_MKBP_USE_CUSTOM for boards which have custmized methods.
3. Remove weak attribute in mkbp_set_host_active (which can be done
with CONFIG_MKBP_USE_CUSTOM now.
4. Removes mkbp_set_host_active function in board Nocturne. It only
deliver MKBP events through GPIO interrupt now.
BRANCH=None
BUG=b:120808999
TEST=grep -rn "CONFIG_MKBP_USE_GPIO\|EC_INT_L" board/ baseboard/ and
see the result is reasonable:
1. EC_INT_L must be 1-to-1 mapped to define CONFIG_MKBP_USE_GPIO in
every board, except that meep, yorp, ampton which are defined in
baseboard octopus.
2. undef CONFIG_MKBP_USE_GPIO in bip and casta, which use host
event, but also have baseboard octopus.
Change-Id: I4af6110e4fd3c009968075c3623ef2d91cbd770b
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1490794
Commit-Ready: Jett Rink <jettrink@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h index 0ca81be60b..0f87f97784 100644 --- a/include/config.h +++ b/include/config.h @@ -2496,9 +2496,15 @@ /* Support MKBP event */ #undef CONFIG_MKBP_EVENT -/* MKBP events are sent using host event */ +/* MKBP events are sent by using host event */ #undef CONFIG_MKBP_USE_HOST_EVENT +/* MKBP events are sent by using GPIO */ +#undef CONFIG_MKBP_USE_GPIO + +/* MKBP events are sent by using custom method */ +#undef CONFIG_MKBP_USE_CUSTOM + /* * With this option, we can define the MKBP wakeup events in this mask (as a * white list) in board level, those events allow to interrupt AP during S3. @@ -3968,6 +3974,22 @@ #endif /******************************************************************************/ +/* MKBP events delivery methods. */ +#ifdef CONFIG_MKBP_EVENT +#if !defined(CONFIG_MKBP_USE_CUSTOM) && \ + !defined(CONFIG_MKBP_USE_HOST_EVENT) && \ + !defined(CONFIG_MKBP_USE_GPIO) +#error Please define one of CONFIG_MKBP_USE_* macro. +#endif + +#if defined(CONFIG_MKBP_USE_CUSTOM) + \ + defined(CONFIG_MKBP_USE_GPIO) + \ + defined(CONFIG_MKBP_USE_HOST_EVENT) > 1 +#error Must select only one type of MKBP event delivery method. +#endif +#endif /* CONFIG_MKBP_EVENT */ + +/******************************************************************************/ /* Set generic orientation config if a specific orientation config is set. */ #if defined(CONFIG_KX022_ORIENTATION_SENSOR) || \ defined(CONFIG_BMI160_ORIENTATION_SENSOR) |