diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-06-18 13:44:29 +0300 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2020-11-19 22:58:11 +0000 |
commit | 4a3f67a9f22f52c2f495cf3708ffb2a92bd9fa70 (patch) | |
tree | 7cb45e365edfe4bf86eb67e254e6aeea0985d0cc /src/include | |
parent | dc5539fe16ba025e6ab6b1a964653d8a82069be7 (diff) | |
download | coreboot-4a3f67a9f22f52c2f495cf3708ffb2a92bd9fa70.tar.xz |
ACPI S3: Split arch-agnostic parts
Change-Id: I9fc2d1cdbb280f781045882bc4ac98c67946953e
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42614
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/include')
-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) { |