summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-04 19:22:26 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-06 04:11:46 +0000
commit746241f114e851623d2031959a99b06a5102708b (patch)
treecb80193b75e7b335978d51b71734e5f7c2b004e5 /src/arch/x86
parentb92ad0b0775b939240980bb4a1c60521efb7d008 (diff)
ACPI S3: Remove conflicting local acpi_get_sleep_type()
We now require EARLY_CBMEM_INIT and romstage_handoff to support HAVE_ACPI_RESUME. Thus acpi_handoff_wakeup() would never call an externally defined acpi_get_sleep_type(). Name _sleep_type() was also inapproriate here, as it referred to hardware-dependent SLP_TYP field of PM1CNT but still returned ACPI_Sx value instead. Change-Id: I8dc130f1e86dd7e96922d546f0ae9713188336cd Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21397 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/acpi_s3.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c
index a0a790567e..0a17eadc53 100644
--- a/src/arch/x86/acpi_s3.c
+++ b/src/arch/x86/acpi_s3.c
@@ -30,22 +30,17 @@
/* This is filled with acpi_is_wakeup() call early in ramstage. */
static int acpi_slp_type = -1;
-#if IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)
-int acpi_get_sleep_type(void)
-{
- if (romstage_handoff_is_resume()) {
- printk(BIOS_DEBUG, "S3 Resume.\n");
- return ACPI_S3;
- }
- printk(BIOS_DEBUG, "Normal boot.\n");
- return ACPI_S0;
-}
-#endif
-
static void acpi_handoff_wakeup(void)
{
- if (acpi_slp_type < 0)
- acpi_slp_type = acpi_get_sleep_type();
+ if (acpi_slp_type < 0) {
+ if (romstage_handoff_is_resume()) {
+ printk(BIOS_DEBUG, "S3 Resume.\n");
+ acpi_slp_type = ACPI_S3;
+ } else {
+ printk(BIOS_DEBUG, "Normal boot.\n");
+ acpi_slp_type = ACPI_S0;
+ }
+ }
}
int acpi_is_wakeup(void)