summaryrefslogtreecommitdiff
path: root/src/soc/intel/fsp_baytrail
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-01-08 20:03:18 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-03-10 23:42:10 +0100
commit9e94dbfcd089db31b2201381f9d83a89cdea86b9 (patch)
treef73b282c8e37e29966f6a86419ceead0f6e5f39a /src/soc/intel/fsp_baytrail
parenta63719407fc5fad17eebe0e5086511a511466353 (diff)
ACPI: Get S3 resume state from romstage_handoff
There is nothing platform specific in retrieving S3 resume state from romstage_handoff structure. Boards without EARLY_CBMEM_INIT update acpi_slp_type from ACPI power-management block or scratchpad registers. Change-Id: Ifc3755f891a0810473b3216c1fec8e45908fc1ab Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8188 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/soc/intel/fsp_baytrail')
-rw-r--r--src/soc/intel/fsp_baytrail/ramstage.c24
-rw-r--r--src/soc/intel/fsp_baytrail/southcluster.c1
2 files changed, 5 insertions, 20 deletions
diff --git a/src/soc/intel/fsp_baytrail/ramstage.c b/src/soc/intel/fsp_baytrail/ramstage.c
index 814b16e73d..ad1db332ea 100644
--- a/src/soc/intel/fsp_baytrail/ramstage.c
+++ b/src/soc/intel/fsp_baytrail/ramstage.c
@@ -19,6 +19,7 @@
#include <arch/cpu.h>
#include <arch/acpi.h>
+#include <cbmem.h>
#include <console/console.h>
#include <cpu/intel/microcode.h>
#include <cpu/x86/cr.h>
@@ -26,8 +27,8 @@
#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
-#include <romstage_handoff.h>
#include <stdlib.h>
+#include <string.h>
#include <baytrail/gpio.h>
#include <baytrail/lpc.h>
@@ -125,31 +126,16 @@ static void fill_in_pattrs(void)
attrs->bclk_khz = bus_freq_khz();
}
-
-static inline void set_acpi_sleep_type(int val)
-{
-#if CONFIG_HAVE_ACPI_RESUME
- acpi_slp_type = val;
-#endif
-}
-
static void s3_resume_prepare(void)
{
global_nvs_t *gnvs;
- struct romstage_handoff *romstage_handoff;
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
-
- romstage_handoff = cbmem_find(CBMEM_ID_ROMSTAGE_INFO);
- if (romstage_handoff == NULL || romstage_handoff->s3_resume == 0) {
- if (gnvs != NULL) {
- memset(gnvs, 0, sizeof(global_nvs_t));
- }
- set_acpi_sleep_type(0);
+ if (gnvs == NULL)
return;
- }
- set_acpi_sleep_type(3);
+ if (!acpi_is_wakeup_s3())
+ memset(gnvs, 0, sizeof(global_nvs_t));
}
void baytrail_init_pre_device(void)
diff --git a/src/soc/intel/fsp_baytrail/southcluster.c b/src/soc/intel/fsp_baytrail/southcluster.c
index ec2f94f474..d515286964 100644
--- a/src/soc/intel/fsp_baytrail/southcluster.c
+++ b/src/soc/intel/fsp_baytrail/southcluster.c
@@ -33,7 +33,6 @@
#include <pc80/i8254.h>
#include <pc80/i8259.h>
#include <pc80/isa-dma.h>
-#include <romstage_handoff.h>
#include <baytrail/baytrail.h>
#include <baytrail/iomap.h>