summaryrefslogtreecommitdiff
path: root/board/nocturne
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2019-02-25 19:05:32 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-07 20:21:39 -0800
commit8b1b74c10a87c8477bc65b7be1f6943676bd56bb (patch)
tree3f2edb77977ee4aeaf0c1cb3da1a4c73769dcf07 /board/nocturne
parent1641ef6a6e12ca4e26764ad0a083fc07a08da96d (diff)
downloadchrome-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 'board/nocturne')
-rw-r--r--board/nocturne/board.c20
-rw-r--r--board/nocturne/board.h1
2 files changed, 1 insertions, 20 deletions
diff --git a/board/nocturne/board.c b/board/nocturne/board.c
index 3b170dd06f..de373e417f 100644
--- a/board/nocturne/board.c
+++ b/board/nocturne/board.c
@@ -402,26 +402,6 @@ void board_hibernate(void)
;
}
-static int mkbp_uses_gpio(void)
-{
- return board_get_version() >= 2;
-}
-
-void mkbp_set_host_active(int active)
-{
- if (mkbp_uses_gpio())
- mkbp_set_host_active_via_gpio(active);
-
- /*
- * Always send the host event for compatibility.
- * On board versions 2 and newer, the firmware is configured
- * to not actually trigger an SCI on MKBP events. This means that
- * the EC can send host event notifications without concern for the
- * board version and expect the right thing to happen.
- */
- mkbp_set_host_active_via_event(active);
-}
-
static void board_init(void)
{
/* Enable USB Type-C interrupts. */
diff --git a/board/nocturne/board.h b/board/nocturne/board.h
index fcd9adb5fd..15464dfba7 100644
--- a/board/nocturne/board.h
+++ b/board/nocturne/board.h
@@ -86,6 +86,7 @@
/* MKBP */
#define CONFIG_MKBP_EVENT
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
+#define CONFIG_MKBP_USE_GPIO
/* Sensors */
#define CONFIG_ALS