From 28a7d9bf795ac0f6dea4f6495c1afaaf3ec051ef 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: [PATCH] mb/google/slippy: Re-arrange mainboard_smi_sleep() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9ac7293e03bba773753f48163aca9385f819a71b Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/74822 Reviewed-by: Matt DeVillier Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/slippy/smihandler.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mainboard/google/slippy/smihandler.c b/src/mainboard/google/slippy/smihandler.c index 7e4b271e3f..c68741b2e9 100644 --- a/src/mainboard/google/slippy/smihandler.c +++ b/src/mainboard/google/slippy/smihandler.c @@ -34,23 +34,23 @@ void mainboard_smi_sleep(u8 slp_typ) switch (slp_typ) { case ACPI_S3: - /* Prevent leak from standby rail to WLAN rail in S3. */ + case ACPI_S4: + case ACPI_S5: + /* Prevent leak from standby rail to WLAN rail in S3/S4/S5. */ set_gpio(GPIO_WLAN_DISABLE_L, 0); set_gpio(GPIO_PP3300_CODEC_EN, 0); /* Disable LTE */ set_gpio(GPIO_LTE_DISABLE_L, 0); + 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: - /* Prevent leak from standby rail to WLAN rail in S5. */ - set_gpio(GPIO_WLAN_DISABLE_L, 0); - set_gpio(GPIO_PP3300_CODEC_EN, 0); - /* Disable LTE */ - set_gpio(GPIO_LTE_DISABLE_L, 0); - /* Enable wake events */ google_chromeec_set_wake_mask(MAINBOARD_EC_S5_WAKE_EVENTS); break;