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@amd.com> Acked-by: Marc Jones <marcj303@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6136 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
9c9ae3ae8f
commit
ea62e9b47d
|
@ -1023,13 +1023,9 @@ static void fenceDynTraining_D(struct MCTStatStruc *pMCTstat,
|
||||||
|
|
||||||
dev = pDCTstat->dev_dct;
|
dev = pDCTstat->dev_dct;
|
||||||
for (index = 0x50; index <= 0x52; index ++) {
|
for (index = 0x50; index <= 0x52; index ++) {
|
||||||
val = Get_NB32_index_wait(dev, index_reg, index);
|
val = (FenceTrnFinDlySeed & 0x1F);
|
||||||
val |= (FenceTrnFinDlySeed & 0x1F);
|
|
||||||
if (index != 0x52) {
|
if (index != 0x52) {
|
||||||
val &= ~(0xFF << 8);
|
val |= val << 8 | val << 16 | val << 24;
|
||||||
val |= (val & 0xFF) << 8;
|
|
||||||
val &= 0xFFFF;
|
|
||||||
val |= val << 16;
|
|
||||||
}
|
}
|
||||||
Set_NB32_index_wait(dev, index_reg, index, val);
|
Set_NB32_index_wait(dev, index_reg, index, val);
|
||||||
}
|
}
|
||||||
|
|
|
@ -972,13 +972,9 @@ static void fenceDynTraining_D(struct MCTStatStruc *pMCTstat,
|
||||||
*/
|
*/
|
||||||
dev = pDCTstat->dev_dct;
|
dev = pDCTstat->dev_dct;
|
||||||
for (index = 0x50; index <= 0x52; index ++) {
|
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) {
|
if (index != 0x52) {
|
||||||
val &= ~(0xFF << 8);
|
val |= val << 8 | val << 16 | val << 24;
|
||||||
val |= (val & 0xFF) << 8;
|
|
||||||
val &= 0xFFFF;
|
|
||||||
val |= val << 16;
|
|
||||||
}
|
}
|
||||||
Set_NB32_index_wait(dev, index_reg, index, val);
|
Set_NB32_index_wait(dev, index_reg, index, val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue