[coreboot-gerrit] Change in coreboot[master]: amd/stoneyridge: Clean up smi_util.c
Marshall Dawson (Code Review)
gerrit at coreboot.org
Thu Sep 28 18:27:43 CEST 2017
Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/21743
Change subject: amd/stoneyridge: Clean up smi_util.c
......................................................................
amd/stoneyridge: Clean up smi_util.c
Replace hardcoded values with defined ones.
Change-Id: If963a817a4bea9b6dbb0d41a2bc0789a44a01391
Signed-off-by: Marshall Dawson <marshalldawson3rd at gmail.com>
---
M src/soc/amd/stoneyridge/smi_util.c
1 file changed, 2 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/21743/1
diff --git a/src/soc/amd/stoneyridge/smi_util.c b/src/soc/amd/stoneyridge/smi_util.c
index 822738c..68e792c 100644
--- a/src/soc/amd/stoneyridge/smi_util.c
+++ b/src/soc/amd/stoneyridge/smi_util.c
@@ -8,15 +8,12 @@
#include <console/console.h>
#include <soc/smi.h>
-#define STONEYRIDGE_SMI_ACPI_COMMAND 75
-
static void configure_smi(uint8_t smi_num, uint8_t mode)
{
uint8_t reg32_offset, bit_offset;
uint32_t reg32;
- /* SMI sources range from [0:149] */
- if (smi_num > 149) {
+ if (smi_num >= NUMBER_SMITYPES) {
printk(BIOS_WARNING, "BUG: Invalid SMI: %u\n", smi_num);
return;
}
@@ -74,5 +71,5 @@
/** Enable SMIs on writes to ACPI SMI command port */
void enable_acpi_cmd_smi(void)
{
- configure_smi(STONEYRIDGE_SMI_ACPI_COMMAND, SMI_MODE_SMI);
+ configure_smi(SMITYPE_SMI_CMD_PORT, SMI_MODE_SMI);
}
--
To view, visit https://review.coreboot.org/21743
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If963a817a4bea9b6dbb0d41a2bc0789a44a01391
Gerrit-Change-Number: 21743
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170928/d8be71b0/attachment.html>
More information about the coreboot-gerrit
mailing list