]> git.sur5r.net Git - u-boot/commitdiff
powerpc/mpc8xxx: fix recognition of DIMMs with ECC and Address Parity
authorYork Sun <yorksun@freescale.com>
Thu, 17 Mar 2011 18:18:10 +0000 (11:18 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 24 Mar 2011 14:20:49 +0000 (09:20 -0500)
To recognize DIMMs with ECC capability by testing ECC bit only. Not to be
confused by Address Parity bit.

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

index a58e5a96560f4bf108ac4a1efd9c9e96f7d99eb6..8b31ec0cfaeb97f5d078eedde6d40d1f40e70e1d 100644 (file)
@@ -367,7 +367,8 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        /* Determine if all DIMMs ECC capable. */
        temp1 = 1;
        for (i = 0; i < number_of_dimms; i++) {
-               if (dimm_params[i].n_ranks && dimm_params[i].edc_config != 2) {
+               if (dimm_params[i].n_ranks &&
+                       !(dimm_params[i].edc_config & EDC_ECC)) {
                        temp1 = 0;
                        break;
                }
index be8260277bc58adc37273e796c5776fc04cf7d80..982b8094625bb3c932f3a79f315f8081126982ee 100644 (file)
@@ -9,6 +9,10 @@
 #ifndef DDR2_DIMM_PARAMS_H
 #define DDR2_DIMM_PARAMS_H
 
+#define EDC_DATA_PARITY        1
+#define EDC_ECC                2
+#define EDC_AC_PARITY  4
+
 /* Parameters for a DDR2 dimm computed from the SPD */
 typedef struct dimm_params_s {