diff options
Diffstat (limited to 'src/soc/intel/baytrail')
-rw-r--r-- | src/soc/intel/baytrail/ramstage.c | 11 | ||||
-rw-r--r-- | src/soc/intel/baytrail/southcluster.c | 5 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/soc/intel/baytrail/ramstage.c b/src/soc/intel/baytrail/ramstage.c index b15970e7b3..e199e9fc59 100644 --- a/src/soc/intel/baytrail/ramstage.c +++ b/src/soc/intel/baytrail/ramstage.c @@ -2,6 +2,7 @@ #include <arch/cpu.h> #include <acpi/acpi.h> +#include <acpi/acpi_gnvs.h> #include <cbmem.h> #include <console/console.h> #include <cpu/intel/microcode.h> @@ -143,15 +144,9 @@ static void s3_save_acpi_wake_source(struct global_nvs *gnvs) static void s3_resume_prepare(void) { - struct global_nvs *gnvs; + struct global_nvs *gnvs = acpi_get_gnvs(); - gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(struct global_nvs)); - if (gnvs == NULL) - return; - - if (!acpi_is_wakeup_s3()) - memset(gnvs, 0, sizeof(struct global_nvs)); - else + if (gnvs && acpi_is_wakeup_s3()) s3_save_acpi_wake_source(gnvs); } diff --git a/src/soc/intel/baytrail/southcluster.c b/src/soc/intel/baytrail/southcluster.c index 2df6410e64..d8305c612d 100644 --- a/src/soc/intel/baytrail/southcluster.c +++ b/src/soc/intel/baytrail/southcluster.c @@ -489,11 +489,6 @@ static void southcluster_inject_dsdt(const struct device *device) struct global_nvs *gnvs; gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); - if (!gnvs) { - gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs)); - if (gnvs) - memset(gnvs, 0, sizeof(*gnvs)); - } if (gnvs) { acpi_create_gnvs(gnvs); |