<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21743">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd/stoneyridge: Clean up smi_util.c<br><br>Replace hardcoded values with defined ones.<br><br>Change-Id: If963a817a4bea9b6dbb0d41a2bc0789a44a01391<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>M src/soc/amd/stoneyridge/smi_util.c<br>1 file changed, 2 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/21743/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/smi_util.c b/src/soc/amd/stoneyridge/smi_util.c<br>index 822738c..68e792c 100644<br>--- a/src/soc/amd/stoneyridge/smi_util.c<br>+++ b/src/soc/amd/stoneyridge/smi_util.c<br>@@ -8,15 +8,12 @@<br> #include <console/console.h><br> #include <soc/smi.h><br> <br>-#define STONEYRIDGE_SMI_ACPI_COMMAND                75<br>-<br> static void configure_smi(uint8_t smi_num, uint8_t mode)<br> {<br>  uint8_t reg32_offset, bit_offset;<br>     uint32_t reg32;<br> <br>-   /* SMI sources range from [0:149] */<br>- if (smi_num > 149) {<br>+      if (smi_num >= NUMBER_SMITYPES) {<br>          printk(BIOS_WARNING, "BUG: Invalid SMI: %u\n", smi_num);<br>            return;<br>       }<br>@@ -74,5 +71,5 @@<br> /** Enable SMIs on writes to ACPI SMI command port */<br> void enable_acpi_cmd_smi(void)<br> {<br>-    configure_smi(STONEYRIDGE_SMI_ACPI_COMMAND, SMI_MODE_SMI);<br>+   configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI);<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21743">change 21743</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/21743"/><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: If963a817a4bea9b6dbb0d41a2bc0789a44a01391 </div>
<div style="display:none"> Gerrit-Change-Number: 21743 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>