summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/host_event_commands.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/host_event_commands.c b/common/host_event_commands.c
index 0f092f6bea..5fad82b4b6 100644
--- a/common/host_event_commands.c
+++ b/common/host_event_commands.c
@@ -129,6 +129,15 @@ int lpc_get_next_host_event(void)
host_event_t ev;
int evt_idx = __builtin_ffs(lpc_host_events);
+#ifdef CONFIG_HOST_EVENT64
+ if (evt_idx == 0) {
+ int evt_idx_high = __builtin_ffs(lpc_host_events >> 32);
+
+ if (evt_idx_high)
+ evt_idx = 32 + evt_idx_high;
+ }
+#endif
+
if (evt_idx) {
host_event_set_bit(&ev, evt_idx);
host_clear_events(ev);