summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/ibexpeak
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-06-01 15:11:14 +0300
committerPatrick Georgi <pgeorgi@google.com>2020-06-16 08:02:18 +0000
commitb6585481e8cb30ed04a1673b170af3df9e0e4320 (patch)
tree09d4fad217ffb0dd6fb33b4d8e4c8dc20bfd708f /src/southbridge/intel/ibexpeak
parent94464474756f0cacdf04a70b95ec4a0462516a63 (diff)
arch/x86: Create helper for APM_CNT SMI triggers
Attempts to write to APM_CNT IO port should always be guarded with a test to verify SMI handler has been installed. Immediate followup removes redundant HAVE_SMI_HANDLER tests. Change-Id: If3fb0f1a8b32076f1d9f3fea9f817dd4b093ad98 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41971 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/ibexpeak')
-rw-r--r--src/southbridge/intel/ibexpeak/lpc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/southbridge/intel/ibexpeak/lpc.c b/src/southbridge/intel/ibexpeak/lpc.c
index b57e30ec8a..2362649ae6 100644
--- a/src/southbridge/intel/ibexpeak/lpc.c
+++ b/src/southbridge/intel/ibexpeak/lpc.c
@@ -409,9 +409,7 @@ static void enable_clock_gating(struct device *dev)
static void pch_set_acpi_mode(void)
{
if (!acpi_is_wakeup_s3() && CONFIG(HAVE_SMI_HANDLER)) {
- printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n");
- outb(APM_CNT_ACPI_DISABLE, APM_CNT); // Disable ACPI mode
- printk(BIOS_DEBUG, "done.\n");
+ apm_control(APM_CNT_ACPI_DISABLE); // Disable ACPI mode
}
}
@@ -727,7 +725,7 @@ static void lpc_final(struct device *dev)
if (CONFIG(HAVE_SMI_HANDLER)) {
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
acpi_is_wakeup_s3()) {
- outb(APM_CNT_FINALIZE, APM_CNT);
+ apm_control(APM_CNT_FINALIZE);
}
}
}