Patchwork [U-Boot] powerpc/8xxx: Display DIMM model

login
register
mail settings
Submitter York Sun
Date Feb. 4, 2011, 9:58 p.m.
Message ID <1296856680-28840-2-git-send-email-yorksun@freescale.com>
Download mbox | patch
Permalink /patch/81959/
State Accepted
Commit c399765d9cb46e8e20739251d5f3151a5608328d
Delegated to: Kumar Gala
Headers show

Comments

York Sun - Feb. 4, 2011, 9:58 p.m.
Beside displaying RDIMM or UDIMM, this patch adds display of the model numbers
embedded in SPD.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c        |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
Kumar Gala - Feb. 10, 2011, 5:31 a.m.
On Feb 4, 2011, at 3:58 PM, York Sun wrote:

> Beside displaying RDIMM or UDIMM, this patch adds display of the model numbers
> embedded in SPD.
> 
> Signed-off-by: York Sun <yorksun@freescale.com>
> ---
> .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c        |   11 +++++++----
> 1 files changed, 7 insertions(+), 4 deletions(-)

applied to 85xx next

- k

Patch

diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
index a58e5a9..684b2f4 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
@@ -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");