summaryrefslogtreecommitdiff
path: root/src/northbridge/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd')
-rw-r--r--src/northbridge/amd/amdmct/mct/mctsrc.c8
-rw-r--r--src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/src/northbridge/amd/amdmct/mct/mctsrc.c b/src/northbridge/amd/amdmct/mct/mctsrc.c
index 258be0468d..6a0ae306b3 100644
--- a/src/northbridge/amd/amdmct/mct/mctsrc.c
+++ b/src/northbridge/amd/amdmct/mct/mctsrc.c
@@ -1023,13 +1023,9 @@ static void fenceDynTraining_D(struct MCTStatStruc *pMCTstat,
dev = pDCTstat->dev_dct;
for (index = 0x50; index <= 0x52; index ++) {
- val = Get_NB32_index_wait(dev, index_reg, index);
- val |= (FenceTrnFinDlySeed & 0x1F);
+ val = (FenceTrnFinDlySeed & 0x1F);
if (index != 0x52) {
- val &= ~(0xFF << 8);
- val |= (val & 0xFF) << 8;
- val &= 0xFFFF;
- val |= val << 16;
+ val |= val << 8 | val << 16 | val << 24;
}
Set_NB32_index_wait(dev, index_reg, index, val);
}
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c b/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
index b11da61156..76ddb88d53 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
@@ -972,13 +972,9 @@ static void fenceDynTraining_D(struct MCTStatStruc *pMCTstat,
*/
dev = pDCTstat->dev_dct;
for (index = 0x50; index <= 0x52; index ++) {
- val = Get_NB32_index_wait(dev, index_reg, index) & ~0xFF;
- val |= (FenceTrnFinDlySeed & 0x1F);
+ val = (FenceTrnFinDlySeed & 0x1F);
if (index != 0x52) {
- val &= ~(0xFF << 8);
- val |= (val & 0xFF) << 8;
- val &= 0xFFFF;
- val |= val << 16;
+ val |= val << 8 | val << 16 | val << 24;
}
Set_NB32_index_wait(dev, index_reg, index, val);
}