]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc/mpc8xxx: Adding fallback to raw timing on supported boards
authorYork Sun <yorksun@freescale.com>
Tue, 7 Jun 2011 01:42:17 +0000 (09:42 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 11 Jul 2011 18:24:20 +0000 (13:24 -0500)
In case of empty SPD or checksum error, fallback to raw timing on
supported boards.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc8xxx/ddr/main.c

index 3c49fa97c0acab2d9fe67b968d4f9cc66014e817..249fd7dfb36086bd59bc278663564408819d49f5 100644 (file)
@@ -343,12 +343,20 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
                                        &(pinfo->dimm_params[i][j]);
 
                                retval = compute_dimm_parameters(spd, pdimm, i);
+#ifdef CONFIG_SYS_DDR_RAW_TIMING
+                               if (retval != 0) {
+                                       printf("SPD error! Trying fallback to "
+                                       "raw timing calculation\n");
+                                       fsl_ddr_get_dimm_params(pdimm, i, j);
+                               }
+#else
                                if (retval == 2) {
                                        printf("Error: compute_dimm_parameters"
                                        " non-zero returned FATAL value "
                                        "for memctl=%u dimm=%u\n", i, j);
                                        return 0;
                                }
+#endif
                                if (retval) {
                                        debug("Warning: compute_dimm_parameters"
                                        " non-zero return value for memctl=%u "