diff options
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/acpi/acpi.c | 7 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/acpi.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/soc/amd/common/block/acpi/acpi.c b/src/soc/amd/common/block/acpi/acpi.c index 4ca6599536..572faa51a1 100644 --- a/src/soc/amd/common/block/acpi/acpi.c +++ b/src/soc/amd/common/block/acpi/acpi.c @@ -3,12 +3,14 @@ #include <amdblocks/acpimmio.h> #include <amdblocks/acpi.h> #include <acpi/acpi.h> +#include <acpi/acpi_gnvs.h> #include <bootmode.h> #include <console/console.h> #include <elog.h> #include <halt.h> #include <security/vboot/vboot_common.h> #include <soc/southbridge.h> +#include <soc/nvs.h> void poweroff(void) { @@ -138,9 +140,12 @@ static int get_index_bit(uint32_t value, uint16_t limit) return i; } -void acpi_fill_gnvs(struct global_nvs *gnvs, const struct acpi_pm_gpe_state *state) +void pm_fill_gnvs(const struct acpi_pm_gpe_state *state) { int index; + struct global_nvs *gnvs = acpi_get_gnvs(); + if (gnvs == NULL) + return; index = get_index_bit(state->pm1_sts & state->pm1_en, PM1_LIMIT); if (index < 0) diff --git a/src/soc/amd/common/block/include/amdblocks/acpi.h b/src/soc/amd/common/block/include/amdblocks/acpi.h index c6e242adaa..0512ad69ff 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpi.h +++ b/src/soc/amd/common/block/include/amdblocks/acpi.h @@ -4,7 +4,6 @@ #define AMD_BLOCK_ACPI_H #include <types.h> -#include <soc/nvs.h> /* ACPI MMIO registers 0xfed80800 */ #define MMIO_ACPI_PM1_STS 0x00 @@ -34,7 +33,7 @@ void acpi_pm_gpe_add_events_print_events(const struct acpi_pm_gpe_state *state); /* Clear PM and GPE status registers. */ void acpi_clear_pm_gpe_status(void); /* Fill GNVS object from PM GPE object. */ -void acpi_fill_gnvs(struct global_nvs *gnvs, const struct acpi_pm_gpe_state *state); +void pm_fill_gnvs(const struct acpi_pm_gpe_state *state); /* * If a system reset is about to be requested, modify the PM1 register so it |