From af656f929299521d2509e5cc927b711f9d4c6ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 5 Jan 2023 18:05:11 +0200 Subject: mb/google/auron: Use chromeec_smi_sleep() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6b67358431d8c2b9f88b4e8948baf3497b902fed Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74821 Reviewed-by: Matt DeVillier Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/auron/smihandler.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/mainboard/google/auron/smihandler.c b/src/mainboard/google/auron/smihandler.c index 0fc3588020..9f86abeecf 100644 --- a/src/mainboard/google/auron/smihandler.c +++ b/src/mainboard/google/auron/smihandler.c @@ -40,26 +40,12 @@ void mainboard_smi_sleep(u8 slp_typ) switch (slp_typ) { case ACPI_S3: - mainboard_disable_gpios(); - - /* Enable wake events */ - google_chromeec_set_wake_mask(MAINBOARD_EC_S3_WAKE_EVENTS); - break; case ACPI_S5: mainboard_disable_gpios(); - - /* 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) -- cgit v1.2.3