More explicite and straight way to set seed.

Signed-off-by: Zheng Bao <[email protected]>


Index: src/northbridge/amd/amdmct/mct/mctsrc.c
===================================================================
--- src/northbridge/amd/amdmct/mct/mctsrc.c     (revision 6135)
+++ src/northbridge/amd/amdmct/mct/mctsrc.c     (working copy)
@@ -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);
        }
Index: src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c
===================================================================
--- src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c        (revision 6135)
+++ src/northbridge/amd/amdmct/mct_ddr3/mctsrc.c        (working copy)
@@ -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);
        }

Attachment: amdmct_succinct.patch
Description: amdmct_succinct.patch

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to