From 3cea0594df500c2f08448ea4e5383fab63a7ab77 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Mon, 2 Nov 2020 14:19:14 -0800 Subject: mb/google/volteer: Log EC events in case of S0ix resume This change adds the callback `elog_gsmi_cb_mainboard_log_wake_source()` to volteer to enable logging of EC events in case of S0ix resume. BUG=b:172272078 BRANCH=volteer TEST=Verified that EC events are logged correctly for S0ix resume: 11 | 2020-11-02 14:11:05 | S0ix Enter 12 | 2020-11-02 14:11:08 | S0ix Exit 13 | 2020-11-02 14:11:08 | Wake Source | Power Button | 0 14 | 2020-11-02 14:11:08 | EC Event | Power Button 15 | 2020-11-02 14:11:17 | S0ix Enter 16 | 2020-11-02 14:11:21 | S0ix Exit 17 | 2020-11-02 14:11:21 | Wake Source | GPE # | 112 18 | 2020-11-02 14:11:21 | EC Event | Lid Open Signed-off-by: Furquan Shaikh Change-Id: I7aa9dc2470da3226925927f2a0cc39fdd426e3b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47142 Reviewed-by: Tim Wawrzynczak Reviewed-by: Karthik Ramasubramanian Tested-by: build bot (Jenkins) --- src/mainboard/google/volteer/smihandler.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mainboard/google/volteer/smihandler.c b/src/mainboard/google/volteer/smihandler.c index 5b3e38ca70..adb60fedbe 100644 --- a/src/mainboard/google/volteer/smihandler.c +++ b/src/mainboard/google/volteer/smihandler.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ #include +#include #include +#include #include #include @@ -22,3 +24,8 @@ int mainboard_smi_apmc(u8 apmc) MAINBOARD_EC_SMI_EVENTS); return 0; } + +void elog_gsmi_cb_mainboard_log_wake_source(void) +{ + google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS | MAINBOARD_EC_S0IX_WAKE_EVENTS); +} -- cgit v1.2.3