summaryrefslogtreecommitdiff
path: root/include/lpc.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-11-14 18:51:42 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-21 18:53:35 -0800
commitc9cd870600b12123dddc88814446327337557369 (patch)
treee1e24ad901e91e98831b38c1ccd315cb272b9a6a /include/lpc.h
parent0da531fae0099080b7dd472ade0788c18162cc19 (diff)
downloadchrome-ec-c9cd870600b12123dddc88814446327337557369.tar.gz
host_events: Bump up host events and masks to 64-bit
With the upcoming change to add a new command to get/set/clear host events and masks, it seems to be the right time to bump up the host events and masks to 64-bit. We are already out of available host events. This change opens up at least 32 bits for new host events. Old EC commands to operate on host events/masks will still deal with lower 32-bits of the events/mask. On the other hand, the new command being added will take care of the entire 64-bit events/masks. This ensures that old BIOS and kernel versions can still work with the newer EC versions. BUG=b:69329196 BRANCH=None TEST=make -j buildall. Verified: 1. hostevent set 0x4000 ==> Sets correct bit in host events 2. hostevent clear 0x4000 ==> Clears correct bit in host events 3. Kernel is able to query and read correct host event bits from EC. Verified using evtest. 4. Coreboot is able to read correct wake reason from EC. Verified using mosys eventlog list. Change-Id: Idcb24ea364ac6c491efc2f8dd9e29a9df6149e07 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/770925 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/lpc.h')
-rw-r--r--include/lpc.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/lpc.h b/include/lpc.h
index 7b9a7d7012..c95999a98e 100644
--- a/include/lpc.h
+++ b/include/lpc.h
@@ -9,6 +9,7 @@
#define __CROS_EC_LPC_H
#include "common.h"
+#include "host_command.h"
/**
* Return a pointer to the memory-mapped buffer.
@@ -78,14 +79,14 @@ enum lpc_host_event_type {
/**
* Get current state of host events.
*/
-uint32_t lpc_get_host_events(void);
+host_event_t lpc_get_host_events(void);
/**
* Get host events that are set based on the type provided.
*
* @param type Event type
*/
-uint32_t lpc_get_host_events_by_type(enum lpc_host_event_type type);
+host_event_t lpc_get_host_events_by_type(enum lpc_host_event_type type);
/**
* Set the event mask for the specified event type.
@@ -93,14 +94,14 @@ uint32_t lpc_get_host_events_by_type(enum lpc_host_event_type type);
* @param type Event type
* @param mask New event mask
*/
-void lpc_set_host_event_mask(enum lpc_host_event_type type, uint32_t mask);
+void lpc_set_host_event_mask(enum lpc_host_event_type type, host_event_t mask);
/**
* Get host event mask based on the type provided.
*
* @param type Event type
*/
-uint32_t lpc_get_host_event_mask(enum lpc_host_event_type type);
+host_event_t lpc_get_host_event_mask(enum lpc_host_event_type type);
/**
* Clear and return the lowest host event.
@@ -147,7 +148,7 @@ void lpc_update_host_event_status(void);
* LPC_HOST_EVENT_ALWAYS_REPORT mask. It can be implemented by boards if there
* is a need to use custom mask.
*/
-uint32_t lpc_override_always_report_mask(void);
+host_event_t lpc_override_always_report_mask(void);
/* Initialize LPC masks. */
void lpc_init_mask(void);