summaryrefslogtreecommitdiffstats
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorJenny TC <jenny.tc@intel.com>2017-12-14 14:24:39 +0530
committerMartin Roth <martinroth@google.com>2018-01-17 17:10:32 +0000
commit1dfc2c3e54468f52bd7f2b204758bac2625a36e6 (patch)
treecb45d78f1f1f11a1fd509b15caf8e8b04165d317 /src/ec/google/chromeec/ec.h
parent0a4e0fd913006de8f5d0a4ea24e013f30243cf5c (diff)
downloadcoreboot-1dfc2c3e54468f52bd7f2b204758bac2625a36e6.tar.gz
coreboot-1dfc2c3e54468f52bd7f2b204758bac2625a36e6.tar.bz2
coreboot-1dfc2c3e54468f52bd7f2b204758bac2625a36e6.zip
google/chromeec: Enable unified host event programming interface
Unified Host Event Programming Interface (UHEPI) enables a unified host command EC_CMD_PROGRAM_HOST_EVENT to set/get/clear different host events. Old host event commands (0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F) is supported for backward compatibility. But newer version of BIOS/OS is expected to use UHEPI command (EC_CMD_PROGRAM_HOST_EVENT) The UHEPI also enables the active and lazy wake masks. Active wake mask is the mask that is programmed in the LPC driver (i.e. the mask that is actively used by LPC driver for waking the host during suspended state). It is same as the current wake mask that is set by the smihandler on host just before entering sleep state S3/S5. On the other hand, lazy wake masks are per-sleep masks (S0ix, S3, S5) so that they can be used by EC to set the active wake mask depending upon the type of sleep that the host has entered. This allows the host BIOS to perform one-time programming of the wake masks for each supported sleep type and then EC can take care of appropriately setting the active mask when host enters a particular sleep state. BRANCH=none BUG=b:63969337 TEST=verify masks with ec hostevent command on S0,S3,S5 and S0ix 1). Verified wake masks with ec hostevent command on S0,S3,S5 and S0ix 2). suspend_stress_test with S3 and S0ix 3). Verified "mosys eventlog list" in S3 and s0ix resume to confirm wake sources (Lid, power buttton and Mode change) 4). Verified "mosys eventlog list" in S5 resume to confirm wake sources (Power Button) 5). Verified above scenarios with combination of Old BIOS + New EC and New BIOS + Old EC Change-Id: I4917a222c79b6aaecb71d7704ffde57bf3bc99d9 Signed-off-by: Jenny TC <jenny.tc@intel.com> Reviewed-on: https://review.coreboot.org/21085 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index e1bf6c8e765e..90bb6fa9d23c 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -31,6 +31,9 @@ int google_chromeec_set_sci_mask(uint64_t mask);
int google_chromeec_set_smi_mask(uint64_t mask);
int google_chromeec_set_wake_mask(uint64_t mask);
u8 google_chromeec_get_event(void);
+
+/* Check if EC supports feature EC_FEATURE_UNIFIED_WAKE_MASKS */
+bool google_chromeec_is_uhepi_supported(void);
int google_ec_running_ro(void);
void google_chromeec_init(void);
@@ -141,6 +144,7 @@ struct google_chromeec_event_info {
uint64_t s3_wake_events;
uint64_t s3_device_events;
uint64_t s5_wake_events;
+ uint64_t s0ix_wake_events;
};
void google_chromeec_events_init(const struct google_chromeec_event_info *info,
bool is_s3_wakeup);