diff options
author | Joel Kitching <kitching@chromium.org> | 2018-06-25 21:51:34 +0000 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-06-25 21:54:45 +0000 |
commit | a470caeabe1618972bfd258320efa12c7c86b39c (patch) | |
tree | b401c63deda196d02044f6ca6b75fe7e4a90bcc1 | |
parent | 12499f2417a6d019ef13c4a654646bb41debe012 (diff) | |
download | chrome-ec-a470caeabe1618972bfd258320efa12c7c86b39c.tar.gz |
Revert "common: allow report disabling of host events"
This reverts commit 4e3d2579bc4d7ad82cb87e955da666af38ba12b8.
Reason for revert: Re-using 32-bit host events instead. See b/110292722
Original change's description:
> common: allow report disabling of host events
>
> Adds a mechanism that allows a board to disable interrupting the AP /
> kernel when the status of any one of the EC_HOST_EVENTS included in
> CONFIG_HOST_EVENT_REPORT_MASK changes state. Default state enables
> reporting of all events; a board can override this by defining
> CONFIG_HOST_EVENT_REPORT_MASK in its board.h file.
>
> NOTE: The host_set_events() and host_clear_events() routines no longer
> interrupt the AP if none of the host events the AP is interested in
> changed state.
>
> BRANCH=none
> BUG=chromium:637061
> TEST=make buildall passes
>
> Change-Id: Ifbea6a76a13c56c3f499d193ee39dc5fee7ca977
> Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/502078
> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
> (cherry picked from commit e9215ba711d337e4cfc9524c4ef07b03a813c8fb)
> Reviewed-on: https://chromium-review.googlesource.com/989860
> Reviewed-by: Joel Kitching <kitching@chromium.org>
> Commit-Queue: Joel Kitching <kitching@chromium.org>
> Tested-by: Joel Kitching <kitching@chromium.org>
> Trybot-Ready: Joel Kitching <kitching@chromium.org>
Bug: chromium:637061
Change-Id: Idb30d9f5aca5997f408b963b06fd7ac417519496
Reviewed-on: https://chromium-review.googlesource.com/1113790
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Trybot-Ready: Joel Kitching <kitching@chromium.org>
-rw-r--r-- | common/host_event_commands.c | 22 | ||||
-rw-r--r-- | include/config.h | 4 |
2 files changed, 7 insertions, 19 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c index 1dc9ac5c0c..0364474de0 100644 --- a/common/host_event_commands.c +++ b/common/host_event_commands.c @@ -40,14 +40,9 @@ uint32_t host_get_events(void) void host_set_events(uint32_t mask) { - /* ignore host events the rest of board doesn't care about */ - mask &= CONFIG_HOST_EVENT_REPORT_MASK; - - /* exit now if nothing has changed */ - if (!((events & mask) != mask || (events_copy_b & mask) != mask)) - return; - - CPRINTS("event set 0x%08x", mask); + /* Only print if something's about to change */ + if ((events & mask) != mask || (events_copy_b & mask) != mask) + CPRINTS("event set 0x%08x", mask); atomic_or(&events, mask); atomic_or(&events_copy_b, mask); @@ -67,14 +62,9 @@ void host_set_events(uint32_t mask) void host_clear_events(uint32_t mask) { - /* ignore host events the rest of board doesn't care about */ - mask &= CONFIG_HOST_EVENT_REPORT_MASK; - - /* return early if nothing changed */ - if (!(events & mask)) - return; - - CPRINTS("event clear 0x%08x", mask); + /* Only print if something's about to change */ + if (events & mask) + CPRINTS("event clear 0x%08x", mask); atomic_clear(&events, mask); diff --git a/include/config.h b/include/config.h index ccf4f2c84b..415cba7b21 100644 --- a/include/config.h +++ b/include/config.h @@ -1261,6 +1261,7 @@ #undef CONFIG_GESTURE_SIGMO_EVENT + /* Do we want to detect the lid angle? */ #undef CONFIG_LID_ANGLE @@ -1327,9 +1328,6 @@ */ #undef CONFIG_HOST_COMMAND_STATUS -/* clear bit(s) to mask reporting of an EC_HOST_EVENT_XXX event(s) */ -#define CONFIG_HOST_EVENT_REPORT_MASK 0xffffffff - /* * The host commands are sorted in the .rodata.hcmds section so use the binary * search algorithm to match a command to its handler |