aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/southbridge.c
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2018-10-26 13:25:01 -0700
committerPatrick Georgi <pgeorgi@google.com>2018-12-03 13:21:35 +0000
commite24d7953bb4a862b32f554195fffb3c119a27161 (patch)
tree621d5fc455ce9bd4388488ba68d38beac3d8b839 /src/soc/amd/stoneyridge/southbridge.c
parent2c5ea145a4547c5c27de4bcc065a6345ea285fe6 (diff)
soc/amd/stoneyridge: Use new ACPI MMIO functions
Replace IO access to ACPI registers with the new MMIO access functions. BUG=b:118049037 TEST=Build and boot grunt. Test ACPI related functionality. Change-Id: I7544169bb21982fcf7b1c07ab7c19c6f5e65ad56 Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/c/29296 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/stoneyridge/southbridge.c')
-rw-r--r--src/soc/amd/stoneyridge/southbridge.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c
index 6157e5013b..fa9e48325d 100644
--- a/src/soc/amd/stoneyridge/southbridge.c
+++ b/src/soc/amd/stoneyridge/southbridge.c
@@ -756,8 +756,8 @@ static void sb_init_acpi_ports(void)
static uint16_t reset_pm1_status(void)
{
- uint16_t pm1_sts = inw(ACPI_PM1_STS);
- outw(pm1_sts, ACPI_PM1_STS);
+ uint16_t pm1_sts = acpi_read16(MMIO_ACPI_PM1_STS);
+ acpi_write16(MMIO_ACPI_PM1_STS, pm1_sts);
return pm1_sts;
}
@@ -812,12 +812,12 @@ static void sb_save_sws(uint16_t pm1_status)
if (sws == NULL)
return;
sws->pm1_sts = pm1_status;
- sws->pm1_en = inw(ACPI_PM1_EN);
- reg32 = inl(ACPI_GPE0_STS);
- outl(ACPI_GPE0_STS, reg32);
+ 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 = inl(ACPI_GPE0_EN);
- reg16 = inw(ACPI_PM1_CNT_BLK);
+ 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;
}