diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-05-02 16:50:27 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-22 02:03:09 -0700 |
commit | 00aef53a7b4c1a302b8f1448f2c634712c7b77eb (patch) | |
tree | 677b36ee77c3ccc7bee7abf1dc664dff5d227d22 /common/host_event_commands.c | |
parent | 9ceaa9d8e0706a4a7f416e76d8b0248579b54939 (diff) | |
download | chrome-ec-00aef53a7b4c1a302b8f1448f2c634712c7b77eb.tar.gz |
mkpb: Add MKBP support over ACPI
Add a host event to support MKPB:
When sent, the ACPI code will send a notification to the kernel
cros-ec-lpcs driver that will issue EC_CMD_GET_NEXT_EVENT.
We can allow code (sensor stack for instance) that uses MKBP to work
on ACPI based architecture.
Obviously, host event over MKPB is not supported.
BRANCH=none
BUG=b:27849483
TEST=Check we get sensor events on Cyan through the sensor ring.
(cyan branch)
Change-Id: Iadc9c852b410cf69ef15bcbbb1b086c36687c687
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/353634
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/host_event_commands.c')
-rw-r--r-- | common/host_event_commands.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c index feb1d93552..4b9320c9ce 100644 --- a/common/host_event_commands.c +++ b/common/host_event_commands.c @@ -51,11 +51,13 @@ void host_set_events(uint32_t mask) lpc_set_host_event_state(events); #else *(uint32_t *)host_get_memmap(EC_MEMMAP_HOST_EVENTS) = events; -#endif - #ifdef CONFIG_MKBP_EVENT - mkbp_send_event(EC_MKBP_EVENT_HOST_EVENT); +#ifdef CONFIG_MKBP_USE_HOST_EVENT +#error "Config error: MKBP must not be on top of host event" #endif + mkbp_send_event(EC_MKBP_EVENT_HOST_EVENT); +#endif /* CONFIG_MKBP_EVENT */ +#endif /* !CONFIG_LPC */ } void host_clear_events(uint32_t mask) @@ -70,11 +72,10 @@ void host_clear_events(uint32_t mask) lpc_set_host_event_state(events); #else *(uint32_t *)host_get_memmap(EC_MEMMAP_HOST_EVENTS) = events; -#endif - #ifdef CONFIG_MKBP_EVENT mkbp_send_event(EC_MKBP_EVENT_HOST_EVENT); #endif +#endif /* !CONFIG_LPC */ } static int host_get_next_event(uint8_t *out) |