mainboards: remove direct acpi_slp_type usage
Use the acpi_is_wakeup_s3() API instead of comparing
a raw value to a global variable. This allows for
easier refactoring.
Change-Id: I2813b5d275cbe700be713272e3a88fdb5759db99
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15690
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
diff --git a/src/mainboard/google/cyan/ec.c b/src/mainboard/google/cyan/ec.c
index 8f516cb..cce7d70 100644
--- a/src/mainboard/google/cyan/ec.c
+++ b/src/mainboard/google/cyan/ec.c
@@ -28,7 +28,7 @@
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
/* Restore SCI event mask on resume. */
- if (acpi_slp_type == 3) {
+ if (acpi_is_wakeup_s3()) {
google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS |
MAINBOARD_EC_S3_WAKE_EVENTS);
diff --git a/src/mainboard/google/ninja/ec.c b/src/mainboard/google/ninja/ec.c
index 994b211..147cded 100644
--- a/src/mainboard/google/ninja/ec.c
+++ b/src/mainboard/google/ninja/ec.c
@@ -26,7 +26,7 @@
post_code(0xf0);
/* Restore SCI event mask on resume. */
- if (acpi_slp_type == 3) {
+ if (acpi_is_wakeup_s3()) {
google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS |
MAINBOARD_EC_S3_WAKE_EVENTS);
diff --git a/src/mainboard/intel/strago/ec.c b/src/mainboard/intel/strago/ec.c
index 0f8c55d..dabe274 100644
--- a/src/mainboard/intel/strago/ec.c
+++ b/src/mainboard/intel/strago/ec.c
@@ -28,7 +28,7 @@
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
/* Restore SCI event mask on resume. */
- if (acpi_slp_type == 3) {
+ if (acpi_is_wakeup_s3()) {
google_chromeec_log_events(MAINBOARD_EC_LOG_EVENTS |
MAINBOARD_EC_S3_WAKE_EVENTS);