soc/amd/common: removed unused functions
Now that all users of the functions manipulating global state and using soc-specific objects are removed remove those functions. BUG=b:159947207 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Change-Id: I18c4c8b0c7852dde8cf0b6b3f11e43e15c3ce155 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44485 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
404a5c3b60
commit
9bed96eb56
|
@ -4,7 +4,6 @@
|
||||||
#include <amdblocks/acpi.h>
|
#include <amdblocks/acpi.h>
|
||||||
#include <acpi/acpi.h>
|
#include <acpi/acpi.h>
|
||||||
#include <bootmode.h>
|
#include <bootmode.h>
|
||||||
#include <cbmem.h>
|
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <elog.h>
|
#include <elog.h>
|
||||||
#include <halt.h>
|
#include <halt.h>
|
||||||
|
@ -25,13 +24,6 @@ void poweroff(void)
|
||||||
halt();
|
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,
|
static void print_num_status_bits(int num_bits, uint32_t status,
|
||||||
const char *const bit_names[])
|
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;
|
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)
|
int acpi_get_sleep_type(void)
|
||||||
{
|
{
|
||||||
return acpi_sleep_from_pm1(acpi_read16(MMIO_ACPI_PM1_CNT_BLK));
|
return acpi_sleep_from_pm1(acpi_read16(MMIO_ACPI_PM1_CNT_BLK));
|
||||||
|
|
|
@ -36,8 +36,6 @@ void acpi_clear_pm_gpe_status(void);
|
||||||
/* Fill GNVS object from PM GPE object. */
|
/* Fill GNVS object from PM GPE object. */
|
||||||
void acpi_fill_gnvs(struct global_nvs *gnvs, const struct acpi_pm_gpe_state *state);
|
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
|
* If a system reset is about to be requested, modify the PM1 register so it
|
||||||
* will never be misinterpreted as an S3 resume.
|
* will never be misinterpreted as an S3 resume.
|
||||||
|
|
Loading…
Reference in New Issue