From f1ade489c85c95c572ef907bdb3b7f4835c1a9c7 Mon Sep 17 00:00:00 2001 From: Rob Barnes Date: Mon, 14 Jun 2021 10:22:21 -0600 Subject: ec/google: Use EC_HOST_EVENT_NONE google_chromeec_get_event returns 0 for no event. Return EC_HOST_EVENT_NONE=0 to improve readability. BUG=b:184074997 TEST=Build and boot guybrush without error Signed-off-by: Rob Barnes Change-Id: Ic08ed9ccdd7c0023d0fe8b641fcf60dca495a242 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55547 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/mainboard/google/rambi/smihandler.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/mainboard/google/rambi') diff --git a/src/mainboard/google/rambi/smihandler.c b/src/mainboard/google/rambi/smihandler.c index c16a0f525b..358a92f967 100644 --- a/src/mainboard/google/rambi/smihandler.c +++ b/src/mainboard/google/rambi/smihandler.c @@ -84,7 +84,8 @@ void mainboard_smi_sleep(uint8_t slp_typ) google_chromeec_set_sci_mask(0); /* Clear pending events that may trigger immediate wake */ - while (google_chromeec_get_event() != 0); + while (google_chromeec_get_event() != EC_HOST_EVENT_NONE) + ; } int mainboard_smi_apmc(uint8_t apmc) @@ -93,13 +94,15 @@ int mainboard_smi_apmc(uint8_t apmc) case APM_CNT_ACPI_ENABLE: google_chromeec_set_smi_mask(0); /* Clear all pending events */ - while (google_chromeec_get_event() != 0); + while (google_chromeec_get_event() != EC_HOST_EVENT_NONE) + ; google_chromeec_set_sci_mask(MAINBOARD_EC_SCI_EVENTS); break; case APM_CNT_ACPI_DISABLE: google_chromeec_set_sci_mask(0); /* Clear all pending events */ - while (google_chromeec_get_event() != 0); + while (google_chromeec_get_event() != EC_HOST_EVENT_NONE) + ; google_chromeec_set_smi_mask(MAINBOARD_EC_SMI_EVENTS); break; } -- cgit v1.2.3