aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-03-10 23:29:11 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-03-12 00:48:01 +0000
commit03a4bfc54d6a467da1ba89ddc9e68e6637f90938 (patch)
tree69431723d80351d2b85904553f2fc3c59788e298 /src/soc/amd/common
parente995684fa1212784bb2642ad21e4e0ce60b19130 (diff)
soc/amd/common/block/smu: rename mailbox register defines
Since we have the SMN access block now, rename the SMU mailbox interface registers to clarify that those are in the SMN register space. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic5b7093f99eabd3c29610072b186ed156f335bd8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51400 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/smu.h2
-rw-r--r--src/soc/amd/common/block/smu/smu.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/smu.h b/src/soc/amd/common/block/include/amdblocks/smu.h
index eeca3c6e7f..ec5db2c9fc 100644
--- a/src/soc/amd/common/block/include/amdblocks/smu.h
+++ b/src/soc/amd/common/block/include/amdblocks/smu.h
@@ -7,7 +7,7 @@
#include <soc/smu.h> /* SoC-dependent definitions for SMU access */
/* Arguments indexed locations are contiguous; the number is SoC-dependent */
-#define REG_ADDR_MESG_ARG(x) (REG_ADDR_MESG_ARGS_BASE + ((x) * sizeof(uint32_t)))
+#define SMN_SMU_MESG_ARG(x) (SMN_SMU_MESG_ARGS_BASE + ((x) * sizeof(uint32_t)))
struct smu_payload {
uint32_t msg[SMU_NUM_ARGS];
diff --git a/src/soc/amd/common/block/smu/smu.c b/src/soc/amd/common/block/smu/smu.c
index 5e1ad0a737..f48a9d5c45 100644
--- a/src/soc/amd/common/block/smu/smu.c
+++ b/src/soc/amd/common/block/smu/smu.c
@@ -20,7 +20,7 @@ static int32_t smu_poll_response(bool print_command_duration)
stopwatch_init_msecs_expire(&sw, timeout_ms);
do {
- result = smn_read32(REG_ADDR_MESG_RESP);
+ result = smn_read32(SMN_SMU_MESG_RESP);
if (result) {
if (print_command_duration)
printk(BIOS_SPEW, "SMU command consumed %ld usecs\n",
@@ -46,14 +46,14 @@ enum cb_err send_smu_message(enum smu_message_id message_id, struct smu_payload
return CB_ERR;
/* clear response register */
- smn_write32(REG_ADDR_MESG_RESP, 0);
+ smn_write32(SMN_SMU_MESG_RESP, 0);
/* populate arguments */
for (i = 0 ; i < SMU_NUM_ARGS ; i++)
- smn_write32(REG_ADDR_MESG_ARG(i), arg->msg[i]);
+ smn_write32(SMN_SMU_MESG_ARG(i), arg->msg[i]);
/* send message to SMU */
- smn_write32(REG_ADDR_MESG_ID, message_id);
+ smn_write32(SMN_SMU_MESG_ID, message_id);
/* wait until SMU has processed the message and check if it was successful */
if (smu_poll_response(true) != SMU_MESG_RESP_OK)
@@ -61,7 +61,7 @@ enum cb_err send_smu_message(enum smu_message_id message_id, struct smu_payload
/* copy returned values */
for (i = 0 ; i < SMU_NUM_ARGS ; i++)
- arg->msg[i] = smn_read32(REG_ADDR_MESG_ARG(i));
+ arg->msg[i] = smn_read32(SMN_SMU_MESG_ARG(i));
return CB_SUCCESS;
}