diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-11-20 20:28:18 -0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2017-11-22 19:10:26 +0000 |
commit | 8788fd63952b50e4692efbf75a21bf0608e4c01c (patch) | |
tree | c5b892728c2aafce88c00bc002ae3f0f31767939 /src/ec/google/chromeec/ec.h | |
parent | beb0468fced261ced7ddbb8a1f982edcaf6cce8c (diff) | |
download | coreboot-8788fd63952b50e4692efbf75a21bf0608e4c01c.tar.xz |
chromeec: Change the API for hostevent/wake masks to handle 64-bit
ChromeEC is getting ready to bump up the hostevents and wake masks to
64-bits. The current commands to program hostevents/wake masks will
still operate on 32-bits only. A new EC host command will be added to
handle 64-bit hostevents/wake masks. In order to prevent individual
callers in coreboot from worrying about 32-bit/64-bit, the same API
provided by google/chromeec will be updated to accept 64-bit
parameters and return 64-bit values. Internally, host command handlers
will take care of masking these parameters/return values to
appropriate 32-bit/64-bit values.
BUG=b:69329196
Change-Id: If59f3f2b1a2aa5ce95883df3e72efc4a32de1190
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22551
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r-- | src/ec/google/chromeec/ec.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index 25a90d756d..0b6f880909 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -26,26 +26,26 @@ void google_chromeec_ioport_range(uint16_t *base, size_t *size); int google_chromeec_i2c_xfer(uint8_t chip, uint8_t addr, int alen, uint8_t *buffer, int len, int is_read); -u32 google_chromeec_get_wake_mask(void); -int google_chromeec_set_sci_mask(u32 mask); -int google_chromeec_set_smi_mask(u32 mask); -int google_chromeec_set_wake_mask(u32 mask); +uint64_t google_chromeec_get_wake_mask(void); +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); int google_ec_running_ro(void); void google_chromeec_init(void); /* Device events */ -uint32_t google_chromeec_get_device_enabled_events(void); -int google_chromeec_set_device_enabled_events(uint32_t mask); -uint32_t google_chromeec_get_device_current_events(void); +uint64_t google_chromeec_get_device_enabled_events(void); +int google_chromeec_set_device_enabled_events(uint64_t mask); +uint64_t google_chromeec_get_device_current_events(void); int google_chromeec_check_feature(int feature); uint8_t google_chromeec_calc_checksum(const uint8_t *data, int size); u16 google_chromeec_get_board_version(void); u32 google_chromeec_get_sku_id(void); int google_chromeec_set_sku_id(u32 skuid); -u32 google_chromeec_get_events_b(void); -int google_chromeec_clear_events_b(u32 mask); +uint64_t google_chromeec_get_events_b(void); +int google_chromeec_clear_events_b(uint64_t mask); int google_chromeec_kbbacklight(int percent); void google_chromeec_post(u8 postcode); int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len); @@ -126,11 +126,11 @@ int crosec_command_proto(struct chromeec_command *cec_command, int google_chromeec_command(struct chromeec_command *cec_command); struct google_chromeec_event_info { - uint32_t log_events; - uint32_t sci_events; - uint32_t s3_wake_events; - uint32_t s3_device_events; - uint32_t s5_wake_events; + uint64_t log_events; + uint64_t sci_events; + uint64_t s3_wake_events; + uint64_t s3_device_events; + uint64_t s5_wake_events; }; void google_chromeec_events_init(const struct google_chromeec_event_info *info, bool is_s3_wakeup); @@ -142,6 +142,6 @@ void google_chromeec_events_init(const struct google_chromeec_event_info *info, int google_chromeec_get_mkbp_event(struct ec_response_get_next_event *event); /* Log host events to eventlog based on the mask provided. */ -void google_chromeec_log_events(u32 mask); +void google_chromeec_log_events(uint64_t mask); #endif /* _EC_GOOGLE_CHROMEEC_EC_H */ |