powerpc/8xxx: Display DIMM model
authorYork Sun <yorksun@freescale.com>
Fri, 4 Feb 2011 21:58:00 +0000 (13:58 -0800)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 4 Apr 2011 14:24:41 +0000 (09:24 -0500)
Beside displaying RDIMM or UDIMM, this patch adds display of the model numbers
embedded in SPD.

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

index 8b31ec0..00f3d6c 100644 (file)
@@ -207,10 +207,15 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        temp1 = temp2 = 0;
        for (i = 0; i < number_of_dimms; i++) {
                if (dimm_params[i].n_ranks) {
-                       if (dimm_params[i].registered_dimm)
+                       if (dimm_params[i].registered_dimm) {
                                temp1 = 1;
-                       if (!dimm_params[i].registered_dimm)
+                               printf("Detected RDIMM %s\n",
+                                       dimm_params[i].mpart);
+                       } else {
                                temp2 = 1;
+                               printf("Detected UDIMM %s\n",
+                                       dimm_params[i].mpart);
+                       }
                }
        }
 
@@ -218,10 +223,8 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params,
        outpdimm->all_DIMMs_unbuffered = 0;
        if (temp1 && !temp2) {
                outpdimm->all_DIMMs_registered = 1;
-               printf("Detected RDIMM(s)\n");
        } else if (!temp1 && temp2) {
                outpdimm->all_DIMMs_unbuffered = 1;
-               printf("Detected UDIMM(s)\n");
        } else {
                printf("ERROR:  Mix of registered buffered and unbuffered "
                                "DIMMs detected!\n");