summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/stoneyridge/include/soc/smi.h1
-rw-r--r--src/soc/amd/stoneyridge/smi_util.c5
-rw-r--r--src/soc/amd/stoneyridge/smihandler.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/soc/amd/stoneyridge/include/soc/smi.h b/src/soc/amd/stoneyridge/include/soc/smi.h
index 87d1a0a03a..5e6f6ff31e 100644
--- a/src/soc/amd/stoneyridge/include/soc/smi.h
+++ b/src/soc/amd/stoneyridge/include/soc/smi.h
@@ -194,6 +194,7 @@ enum smi_lvl {
SMI_LVL_HIGH = 1,
};
+uint16_t pm_acpi_smi_cmd_port(void);
void configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level);
void disable_gevent_smi(uint8_t gevent);
void enable_acpi_cmd_smi(void);
diff --git a/src/soc/amd/stoneyridge/smi_util.c b/src/soc/amd/stoneyridge/smi_util.c
index 42d651a1fd..833e6e37e6 100644
--- a/src/soc/amd/stoneyridge/smi_util.c
+++ b/src/soc/amd/stoneyridge/smi_util.c
@@ -74,3 +74,8 @@ void enable_acpi_cmd_smi(void)
{
configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI);
}
+
+uint16_t pm_acpi_smi_cmd_port(void)
+{
+ return pm_read16(PM_ACPI_SMI_CMD);
+}
diff --git a/src/soc/amd/stoneyridge/smihandler.c b/src/soc/amd/stoneyridge/smihandler.c
index 45dada5227..c3c85e364d 100644
--- a/src/soc/amd/stoneyridge/smihandler.c
+++ b/src/soc/amd/stoneyridge/smihandler.c
@@ -5,7 +5,6 @@
* Subject to the GNU GPL v2, or (at your option) any later version.
*/
-
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <delay.h>
@@ -27,7 +26,7 @@ enum smi_source {
static void sb_apmc_smi_handler(void)
{
u32 reg32;
- const uint8_t cmd = inb(APM_CNT);
+ const uint8_t cmd = inb(pm_acpi_smi_cmd_port());
switch (cmd) {
case APM_CNT_ACPI_ENABLE: