<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21750">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd/stoneyridge: Change SMM setup functions<br><br>Remove the APMC-specific initialization call.  Make the function<br>which programs the event type not static and call it from the<br>southbridge.c file.<br><br>Change-Id: I1e3cf898637720fa835de0a6e735c6a65fe2d3a2<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/soc/amd/stoneyridge/include/soc/smi.h<br>M src/soc/amd/stoneyridge/smi_util.c<br>M src/soc/amd/stoneyridge/southbridge.c<br>3 files changed, 3 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/21750/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/include/soc/smi.h b/src/soc/amd/stoneyridge/include/soc/smi.h<br>index ed4a6c0..d31b8bc 100644<br>--- a/src/soc/amd/stoneyridge/include/soc/smi.h<br>+++ b/src/soc/amd/stoneyridge/include/soc/smi.h<br>@@ -222,9 +222,9 @@<br> }<br> <br> uint16_t pm_acpi_smi_cmd_port(void);<br>+void configure_smi(uint8_t smi_num, uint8_t mode);<br> void configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level);<br> void disable_gevent_smi(uint8_t gevent);<br>-void enable_acpi_cmd_smi(void);<br> <br> #ifndef __SMM__<br> void enable_smi_generation(void);<br>diff --git a/src/soc/amd/stoneyridge/smi_util.c b/src/soc/amd/stoneyridge/smi_util.c<br>index 833e6e3..96e9d61 100644<br>--- a/src/soc/amd/stoneyridge/smi_util.c<br>+++ b/src/soc/amd/stoneyridge/smi_util.c<br>@@ -9,7 +9,7 @@<br> #include <soc/southbridge.h><br> #include <soc/smi.h><br> <br>-static void configure_smi(uint8_t smi_num, uint8_t mode)<br>+void configure_smi(uint8_t smi_num, uint8_t mode)<br> {<br>        uint8_t reg32_offset, bit_offset;<br>     uint32_t reg32;<br>@@ -67,12 +67,6 @@<br> <br>        /* SMI0 source is GEVENT0 and so on */<br>        configure_smi(gevent, SMI_MODE_DISABLE);<br>-}<br>-<br>-/** Enable SMIs on writes to ACPI SMI command port */<br>-void enable_acpi_cmd_smi(void)<br>-{<br>- configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI);<br> }<br> <br> uint16_t pm_acpi_smi_cmd_port(void)<br>diff --git a/src/soc/amd/stoneyridge/southbridge.c b/src/soc/amd/stoneyridge/southbridge.c<br>index a829575..b5357a9 100644<br>--- a/src/soc/amd/stoneyridge/southbridge.c<br>+++ b/src/soc/amd/stoneyridge/southbridge.c<br>@@ -90,7 +90,7 @@<br> <br>    if (IS_ENABLED(CONFIG_HAVE_SMI_HANDLER)) {<br>            pm_write16(PM_ACPI_SMI_CMD, APM_CNT);<br>-                enable_acpi_cmd_smi();<br>+               configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI);<br>    } else {<br>              pm_write16(PM_ACPI_SMI_CMD, 0);<br>       }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21750">change 21750</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21750"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1e3cf898637720fa835de0a6e735c6a65fe2d3a2 </div>
<div style="display:none"> Gerrit-Change-Number: 21750 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>