[coreboot] [commit] r6136 - in trunk/src/northbridge/amd/amdmct: mct mct_ddr3
repository service
svn at coreboot.org
Thu Dec 2 02:50:39 CET 2010
Author: zbao
Date: Thu Dec 2 02:50:38 2010
New Revision: 6136
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6136
Log:
More explicite and straight way to set seed.
The read-modify-write wasn't needed. This is easier to understand.
Signed-off-by: Zheng Bao <zheng.bao at amd.com>
Acked-by: Marc Jones <marcj303 at gmail.com>
Modified:
trunk/src/northbridge/amd/amdmct/mct/mctsrc.c
trunk/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
Modified: trunk/src/northbridge/amd/amdmct/mct/mctsrc.c
==============================================================================
--- trunk/src/northbridge/amd/amdmct/mct/mctsrc.c Tue Nov 30 22:21:33 2010 (r6135)
+++ trunk/src/northbridge/amd/amdmct/mct/mctsrc.c Thu Dec 2 02:50:38 2010 (r6136)
@@ -1023,13 +1023,9 @@
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);
}
Modified: trunk/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
==============================================================================
--- trunk/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c Tue Nov 30 22:21:33 2010 (r6135)
+++ trunk/src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c Thu Dec 2 02:50:38 2010 (r6136)
@@ -972,13 +972,9 @@
*/
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);
}
More information about the coreboot
mailing list