Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved Jason Glenesk: Looks good to me, but someone else must approve
soc/amd/picasso: Fix copy-paste error in macro definitions

The `_MASK` macros should be using the corresponding `_SHIFT` macros.

Change-Id: I78370e17d2396f77ab820771f93cf15957bcf674
Found-by: Coverity CID 1445928
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
---
M src/soc/amd/picasso/include/soc/data_fabric.h
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/soc/amd/picasso/include/soc/data_fabric.h b/src/soc/amd/picasso/include/soc/data_fabric.h
index 4ee1dd9..4dae6b4 100644
--- a/src/soc/amd/picasso/include/soc/data_fabric.h
+++ b/src/soc/amd/picasso/include/soc/data_fabric.h
@@ -65,11 +65,11 @@
#define DF_IND_CFG_ACC_REG_SHIFT 2
#define DF_IND_CFG_ACC_REG_MASK (0x1ff << DF_IND_CFG_ACC_REG_SHIFT)
#define DF_IND_CFG_ACC_FUN_SHIFT 11
-#define DF_IND_CFG_ACC_FUN_MASK (0x7 << DF_IND_CFG_ACC_REG_SHIFT)
+#define DF_IND_CFG_ACC_FUN_MASK (0x7 << DF_IND_CFG_ACC_FUN_SHIFT)
#define DF_IND_CFG_64B_EN_SHIFT 14
-#define DF_IND_CFG_64B_EN (0x1 << DF_IND_CFG_ACC_REG_SHIFT)
+#define DF_IND_CFG_64B_EN (0x1 << DF_IND_CFG_64B_EN_SHIFT)
#define DF_IND_CFG_INST_ID_SHIFT 16
-#define DF_IND_CFG_INST_ID_MASK (0xff << DF_IND_CFG_ACC_REG_SHIFT)
+#define DF_IND_CFG_INST_ID_MASK (0xff << DF_IND_CFG_INST_ID_SHIFT)

void data_fabric_set_mmio_np(void);
uint32_t data_fabric_read32(uint8_t function, uint16_t reg, uint8_t instance_id);

To view, visit change 50232. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I78370e17d2396f77ab820771f93cf15957bcf674
Gerrit-Change-Number: 50232
Gerrit-PatchSet: 3
Gerrit-Owner: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Bao Zheng <zheng.bao@amd.corp-partner.google.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk@gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd@gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged