[U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

carolyn.j.smith at tektronix.com carolyn.j.smith at tektronix.com
Mon Jan 26 17:59:17 CET 2009


This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2 initialization code. The changes were discussed with Stefan Roese and Adam Graham and tested by Adam.

Signed-off-by: Carolyn Smith <carolyn.smith at tektronix.com>
---
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c
--- old/cpu/ppc4xx/44x_spd_ddr2.c       2009-01-20 13:00:33.000000000 -0800
+++ new/cpu/ppc4xx/44x_spd_ddr2.c       2009-01-23 16:00:49.000000000 -0800
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
         * Set the SDRAM Controller On Die Termination Register
         *-----------------------------------------------------------------*/
        mfsdram(SDRAM_CODT, codt);
-       codt |= (SDRAM_CODT_IO_NMODE
-                & (~SDRAM_CODT_DQS_SINGLE_END
-                   & ~SDRAM_CODT_CKSE_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-                   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+       codt |= SDRAM_CODT_IO_NMODE;
+
+       codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+                 SDRAM_CODT_CKSE_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+                 SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+

        for (dimm_num = 0; dimm_num < num_dimm_banks; dimm_num++) {
                if (dimm_populated[dimm_num] != SDRAM_NONE) {



More information about the U-Boot mailing list