summaryrefslogtreecommitdiff
path: root/include/mkbp_event.h
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com>2021-01-19 23:17:30 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-26 19:48:44 +0000
commit8ba2a0dd442aff3dd8cdd486d5c86b15108c1b90 (patch)
tree4438f9939fe8d369c15e682200b6b240a212fbaf /include/mkbp_event.h
parent1e14f4669113703fb496406e6a58602bc17a4001 (diff)
downloadchrome-ec-8ba2a0dd442aff3dd8cdd486d5c86b15108c1b90.tar.gz
zephyr: add MKBP support
Add MKBP support to zephyr. BUG=b:173507858 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: I9b7d979241b0df5dc0fa5d9741f05dc9875189ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639854 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/mkbp_event.h')
-rw-r--r--include/mkbp_event.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mkbp_event.h b/include/mkbp_event.h
index 5bfe7ac505..d9237dd33b 100644
--- a/include/mkbp_event.h
+++ b/include/mkbp_event.h
@@ -8,6 +8,8 @@
#ifndef __CROS_EC_MKBP_EVENT_H
#define __CROS_EC_MKBP_EVENT_H
+#include "common.h"
+
/*
* Last time the host received an interrupt.
*
@@ -46,10 +48,14 @@ struct mkbp_event_source {
int (*get_data)(uint8_t *data);
};
+#ifdef CONFIG_PLATFORM_EC_MKBP_EVENT
+#include "zephyr_mkbp_event.h"
+#else
#define DECLARE_EVENT_SOURCE(type, func) \
const struct mkbp_event_source __keep \
__no_sanitize_address _evt_src_##type \
__attribute__((section(".rodata.evtsrcs"))) \
= {type, func}
+#endif
#endif /* __CROS_EC_MKBP_EVENT_H */