diff options
Diffstat (limited to 'src/mainboard/intel/strago')
-rw-r--r-- | src/mainboard/intel/strago/ec.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/src/mainboard/intel/strago/ec.c b/src/mainboard/intel/strago/ec.c index dabe274fbf..efd20a597f 100644 --- a/src/mainboard/intel/strago/ec.c +++ b/src/mainboard/intel/strago/ec.c @@ -23,33 +23,18 @@ void mainboard_ec_init(void) { + const struct google_chromeec_event_info info = { + .log_events = MAINBOARD_EC_LOG_EVENTS, + .sci_events = MAINBOARD_EC_SCI_EVENTS, + .s3_wake_events = MAINBOARD_EC_S3_WAKE_EVENTS, + .s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS, + }; + printk(BIOS_DEBUG, "mainboard_ec_init\n"); post_code(0xf0); -#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) - /* Restore SCI event mask on resume. */ - if (acpi_is_wakeup_s3()) { - google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS | - MAINBOARD_EC_S3_WAKE_EVENTS); - - /* Disable SMI and wake events */ - google_chromeec_set_smi_mask(0); - - /* Clear pending events */ - while (google_chromeec_get_event() != 0) - ; - /* - * Set SCI mask.OS may not generate the SMI event to - * set this on S3 resume - */ - google_chromeec_set_sci_mask(MAINBOARD_EC_SCI_EVENTS); - } else { - google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS | - MAINBOARD_EC_S5_WAKE_EVENTS); - } + if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) + google_chromeec_events_init(&info, acpi_is_wakeup_s3()); - /* Clear wake event mask */ - google_chromeec_set_wake_mask(0); -#endif post_code(0xf1); } |