diff options
author | Marshall Dawson <marshalldawson3rd@gmail.com> | 2019-05-03 11:44:22 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2019-06-06 18:51:03 +0000 |
commit | 4ee83b2f9435fe08cb73ba818b567597cafd973d (patch) | |
tree | 3a0d2a58b62ac87d990703926aaf82d8347d5d49 /src/soc/amd/stoneyridge/smihandler.c | |
parent | 3ce0360592f036ce586a49db84146d435a23e662 (diff) | |
download | coreboot-4ee83b2f9435fe08cb73ba818b567597cafd973d.tar.xz |
soc/amd/stoneyridge: Relocate MMIO access of ACPI registers
The AcpiMmio block allowing direct access to the ACPI registers
has remained consistent across AMD models. Move the support from
soc//stoneyridge to soc//common.
BUG=b:131682806
Change-Id: I0e017a71f8efb4b614986cb327de398644599853
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32655
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge/smihandler.c')
-rw-r--r-- | src/soc/amd/stoneyridge/smihandler.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c index c3aed578ff..e08aee4c75 100644 --- a/src/soc/amd/stoneyridge/smihandler.c +++ b/src/soc/amd/stoneyridge/smihandler.c @@ -25,6 +25,7 @@ #include <soc/smi.h> #include <soc/southbridge.h> #include <amdblocks/acpimmio.h> +#include <amdblocks/acpi.h> #include <elog.h> /* bits in smm_io_trap */ @@ -88,19 +89,14 @@ static void southbridge_smi_gsmi(void) static void sb_apmc_smi_handler(void) { - u32 reg32; const uint8_t cmd = inb(pm_acpi_smi_cmd_port()); switch (cmd) { case APM_CNT_ACPI_ENABLE: - reg32 = acpi_read32(MMIO_ACPI_PM1_CNT_BLK); - reg32 |= (1 << 0); /* SCI_EN */ - acpi_write32(MMIO_ACPI_PM1_CNT_BLK, reg32); + acpi_enable_sci(); break; case APM_CNT_ACPI_DISABLE: - reg32 = acpi_read32(MMIO_ACPI_PM1_CNT_BLK); - reg32 &= ~(1 << 0); /* clear SCI_EN */ - acpi_write32(MMIO_ACPI_PM1_CNT_BLK, reg32); + acpi_disable_sci(); break; case APM_CNT_ELOG_GSMI: if (CONFIG(ELOG_GSMI)) |