From 7f4f99d5a5ef70a6bea232968efd80d5f6243301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 5 Jan 2023 18:12:57 +0200 Subject: [PATCH] mb/google/slippy: Use chromeec_smi_sleep() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I752d5644d6140e5a6d6f53543bbbc5ef7281f3b4 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74824 Reviewed-by: Matt DeVillier Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/slippy/smihandler.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/mainboard/google/slippy/smihandler.c b/src/mainboard/google/slippy/smihandler.c index c68741b2e9..43c2bf440b 100644 --- a/src/mainboard/google/slippy/smihandler.c +++ b/src/mainboard/google/slippy/smihandler.c @@ -10,7 +10,6 @@ #include /* Include EC functions */ -#include #include #include "ec.h" @@ -44,25 +43,7 @@ void mainboard_smi_sleep(u8 slp_typ) break; } - switch (slp_typ) { - case ACPI_S3: - /* Enable wake events */ - google_chromeec_set_wake_mask(MAINBOARD_EC_S3_WAKE_EVENTS); - break; - case ACPI_S4: - case ACPI_S5: - /* Enable wake events */ - google_chromeec_set_wake_mask(MAINBOARD_EC_S5_WAKE_EVENTS); - break; - } - - /* Disable SCI and SMI events */ - google_chromeec_set_smi_mask(0); - google_chromeec_set_sci_mask(0); - - /* Clear pending events that may trigger immediate wake */ - while (google_chromeec_get_event() != EC_HOST_EVENT_NONE) - ; + chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS, MAINBOARD_EC_S5_WAKE_EVENTS); } int mainboard_smi_apmc(u8 apmc)