diff --git a/src/soc/amd/common/block/acpi/acpi.c b/src/soc/amd/common/block/acpi/acpi.c index 0e6dabf150..17c0ed16c7 100644 --- a/src/soc/amd/common/block/acpi/acpi.c +++ b/src/soc/amd/common/block/acpi/acpi.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -25,13 +24,6 @@ void poweroff(void) halt(); } -static uint16_t reset_pm1_status(void) -{ - uint16_t pm1_sts = acpi_read16(MMIO_ACPI_PM1_STS); - acpi_write16(MMIO_ACPI_PM1_STS, pm1_sts); - return pm1_sts; -} - static void print_num_status_bits(int num_bits, uint32_t status, const char *const bit_names[]) { @@ -151,35 +143,6 @@ void acpi_fill_gnvs(struct global_nvs *gnvs, const struct acpi_pm_gpe_state *sta gnvs->gpei = index; } -static void save_sws(uint16_t pm1_status) -{ - struct soc_power_reg *sws; - uint32_t reg32; - uint16_t reg16; - - sws = cbmem_add(CBMEM_ID_POWER_STATE, sizeof(struct soc_power_reg)); - if (sws == NULL) - return; - sws->pm1_sts = pm1_status; - sws->pm1_en = acpi_read16(MMIO_ACPI_PM1_EN); - reg32 = acpi_read32(MMIO_ACPI_GPE0_STS); - acpi_write32(MMIO_ACPI_GPE0_STS, reg32); - sws->gpe0_sts = reg32; - sws->gpe0_en = acpi_read32(MMIO_ACPI_GPE0_EN); - reg16 = acpi_read16(MMIO_ACPI_PM1_CNT_BLK); - reg16 &= SLP_TYP; - sws->wake_from = reg16 >> SLP_TYP_SHIFT; -} - -void acpi_clear_pm1_status(void) -{ - uint16_t pm1_sts = reset_pm1_status(); - - save_sws(pm1_sts); - log_pm1_status(pm1_sts); - print_pm1_status(pm1_sts); -} - int acpi_get_sleep_type(void) { return acpi_sleep_from_pm1(acpi_read16(MMIO_ACPI_PM1_CNT_BLK)); diff --git a/src/soc/amd/common/block/include/amdblocks/acpi.h b/src/soc/amd/common/block/include/amdblocks/acpi.h index 8d0e5f664e..b6244cb70d 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpi.h +++ b/src/soc/amd/common/block/include/amdblocks/acpi.h @@ -36,8 +36,6 @@ 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 acpi_clear_pm1_status(void); - /* * If a system reset is about to be requested, modify the PM1 register so it * will never be misinterpreted as an S3 resume.