diff options
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/auron/ec.c | 9 | ||||
-rw-r--r-- | src/mainboard/google/slippy/ec.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/mainboard/google/auron/ec.c b/src/mainboard/google/auron/ec.c index 3fc5373096..0589864d7f 100644 --- a/src/mainboard/google/auron/ec.c +++ b/src/mainboard/google/auron/ec.c @@ -29,10 +29,17 @@ void mainboard_ec_init(void) .s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS, }; + int s3_wakeup = acpi_is_wakeup_s3(); + printk(BIOS_DEBUG, "mainboard_ec_init\n"); post_code(0xf0); - google_chromeec_events_init(&info, acpi_is_wakeup_s3()); + google_chromeec_events_init(&info, s3_wakeup); + if (s3_wakeup) { + /* Clear pending events. */ + while (google_chromeec_get_event() != 0) + ; + } post_code(0xf1); } diff --git a/src/mainboard/google/slippy/ec.c b/src/mainboard/google/slippy/ec.c index f8ab6b81d5..e296575a92 100644 --- a/src/mainboard/google/slippy/ec.c +++ b/src/mainboard/google/slippy/ec.c @@ -28,10 +28,17 @@ void mainboard_ec_init(void) .s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS, }; + int s3_wakeup = acpi_is_wakeup_s3(); + printk(BIOS_DEBUG, "mainboard_ec_init\n"); post_code(0xf0); - google_chromeec_events_init(&info, acpi_is_wakeup_s3()); + google_chromeec_events_init(&info, s3_wakeup); + if (s3_wakeup) { + /* Clear pending events. */ + while (google_chromeec_get_event() != 0) + ; + } post_code(0xf1); } |