diff options
Diffstat (limited to 'src/include/acpi')
-rw-r--r-- | src/include/acpi/acpi.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h index bdea467af9..839d485990 100644 --- a/src/include/acpi/acpi.h +++ b/src/include/acpi/acpi.h @@ -1017,6 +1017,7 @@ unsigned long acpi_create_hest_error_source(acpi_hest_t *hest, void __noreturn acpi_resume(void *wake_vec); void mainboard_suspend_resume(void); void *acpi_find_wakeup_vector(void); +int acpi_handoff_wakeup_s3(void); /* ACPI_Sn assignments are defined to always equal the sleep state numbers */ enum { @@ -1062,20 +1063,16 @@ static inline int acpi_s3_resume_allowed(void) return CONFIG(HAVE_ACPI_RESUME); } -#if CONFIG(HAVE_ACPI_RESUME) - -#if ENV_ROMSTAGE_OR_BEFORE static inline int acpi_is_wakeup_s3(void) { - return (acpi_get_sleep_type() == ACPI_S3); -} -#else -int acpi_is_wakeup_s3(void); -#endif + if (!acpi_s3_resume_allowed()) + return 0; -#else -static inline int acpi_is_wakeup_s3(void) { return 0; } -#endif + if (ENV_ROMSTAGE_OR_BEFORE) + return (acpi_get_sleep_type() == ACPI_S3); + + return acpi_handoff_wakeup_s3(); +} static inline uintptr_t acpi_align_current(uintptr_t current) { |