summaryrefslogtreecommitdiff
path: root/src/mainboard/google/slippy
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2021-06-14 10:22:21 -0600
committerWerner Zeh <werner.zeh@siemens.com>2021-06-30 04:57:16 +0000
commitf1ade489c85c95c572ef907bdb3b7f4835c1a9c7 (patch)
treeea5c369beecca0d625b0f440af932dbc03a1dad5 /src/mainboard/google/slippy
parent8bc5fa9f0a36514c2a7ebc5a375b18cb467a57e7 (diff)
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 <robbarnes@google.com> Change-Id: Ic08ed9ccdd7c0023d0fe8b641fcf60dca495a242 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55547 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/mainboard/google/slippy')
-rw-r--r--src/mainboard/google/slippy/ec.c2
-rw-r--r--src/mainboard/google/slippy/smihandler.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mainboard/google/slippy/ec.c b/src/mainboard/google/slippy/ec.c
index 5761a7c579..a3ee95bd0b 100644
--- a/src/mainboard/google/slippy/ec.c
+++ b/src/mainboard/google/slippy/ec.c
@@ -22,7 +22,7 @@ void mainboard_ec_init(void)
google_chromeec_events_init(&info, s3_wakeup);
if (s3_wakeup) {
/* Clear pending events. */
- while (google_chromeec_get_event() != 0)
+ while (google_chromeec_get_event() != EC_HOST_EVENT_NONE)
;
}
diff --git a/src/mainboard/google/slippy/smihandler.c b/src/mainboard/google/slippy/smihandler.c
index 81fcb0aafa..16a1b18b7a 100644
--- a/src/mainboard/google/slippy/smihandler.c
+++ b/src/mainboard/google/slippy/smihandler.c
@@ -100,7 +100,8 @@ void mainboard_smi_sleep(u8 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(u8 apmc)
@@ -109,13 +110,15 @@ int mainboard_smi_apmc(u8 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;
}