Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/21750
Change subject: amd/stoneyridge: Change SMM setup functions ......................................................................
amd/stoneyridge: Change SMM setup functions
Remove the APMC-specific initialization call. Make the function which programs the event type not static and call it from the southbridge.c file.
Change-Id: I1e3cf898637720fa835de0a6e735c6a65fe2d3a2 Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/amd/stoneyridge/include/soc/smi.h M src/soc/amd/stoneyridge/smi_util.c M src/soc/amd/stoneyridge/southbridge.c 3 files changed, 3 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/21750/1
diff --git a/src/soc/amd/stoneyridge/include/soc/smi.h b/src/soc/amd/stoneyridge/include/soc/smi.h index ed4a6c0..d31b8bc 100644 --- a/src/soc/amd/stoneyridge/include/soc/smi.h +++ b/src/soc/amd/stoneyridge/include/soc/smi.h @@ -222,9 +222,9 @@ }
uint16_t pm_acpi_smi_cmd_port(void); +void configure_smi(uint8_t smi_num, uint8_t mode); 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);
#ifndef __SMM__ void enable_smi_generation(void); diff --git a/src/soc/amd/stoneyridge/smi_util.c b/src/soc/amd/stoneyridge/smi_util.c index 833e6e3..96e9d61 100644 --- a/src/soc/amd/stoneyridge/smi_util.c +++ b/src/soc/amd/stoneyridge/smi_util.c @@ -9,7 +9,7 @@ #include <soc/southbridge.h> #include <soc/smi.h>
-static void configure_smi(uint8_t smi_num, uint8_t mode) +void configure_smi(uint8_t smi_num, uint8_t mode) { uint8_t reg32_offset, bit_offset; uint32_t reg32; @@ -67,12 +67,6 @@
/* SMI0 source is GEVENT0 and so on */ configure_smi(gevent, SMI_MODE_DISABLE); -} - -/** Enable SMIs on writes to ACPI SMI command port */ -void enable_acpi_cmd_smi(void) -{ - configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI); }
uint16_t pm_acpi_smi_cmd_port(void) diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c index a829575..b5357a9 100644 --- a/src/soc/amd/stoneyridge/southbridge.c +++ b/src/soc/amd/stoneyridge/southbridge.c @@ -90,7 +90,7 @@
if (IS_ENABLED(CONFIG_HAVE_SMI_HANDLER)) { pm_write16(PM_ACPI_SMI_CMD, APM_CNT); - enable_acpi_cmd_smi(); + configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI); } else { pm_write16(PM_ACPI_SMI_CMD, 0); }