[U-Boot,v4,2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type

Submitted by Ira Snyder on Nov. 21, 2011, 6:59 p.m.

Details

Message ID 1321901993-24478-3-git-send-email-iws@ovro.caltech.edu
State Superseded
Delegated to: Kumar Gala
Headers show

Commit Message

Ira Snyder Nov. 21, 2011, 6:59 p.m.
The generic Freescale DDR SDRAM SPD parsing code fails when the SPD's
module_type field has an unknown value. In this case, we should assume
that the memory module is an unregistered DIMM (the usual case).

The DDR3 DIMM shipped with the Freescale COM Express P2020 Evaluation
Kit has the module_type field set to 0x08. This is an unknown value in
all documentation I can find online.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: York Sun <yorksun@freescale.com>
---

New in v4. Suggestions for other ways to solve this are welcome.

 arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Comments

sun york-R58495 Nov. 21, 2011, 7:11 p.m.

Ira Snyder Nov. 21, 2011, 7:32 p.m.
On Mon, Nov 21, 2011 at 07:11:14PM +0000, sun york-R58495 wrote:
> ________________________________________
> From: Ira W. Snyder [iws@ovro.caltech.edu]
> Sent: Monday, November 21, 2011 10:59 AM
> To: u-boot@lists.denx.de
> Cc: sun york-R58495
> Subject: [PATCH v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type
> 
> The generic Freescale DDR SDRAM SPD parsing code fails when the SPD's
> module_type field has an unknown value. In this case, we should assume
> that the memory module is an unregistered DIMM (the usual case).
> 
> The DDR3 DIMM shipped with the Freescale COM Express P2020 Evaluation
> Kit has the module_type field set to 0x08. This is an unknown value in
> all documentation I can find online.
> 
> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> Cc: York Sun <yorksun@freescale.com>
> ---
> 
> Isn't 0x08 72b-SO-UDIMM?
> 

I found this document, which specifies 7 modes not listed in U-Boot's
include/ddr_spd.h.

http://www.jedec.org/standards-documents/docs/spd-4010211

I'll try to add support for all of the other types defined as I add
support for the module type that I have.

Thanks,
Ira

Patch hide | download patch | download mbox

diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
index ffb503a..b2c0899 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c
@@ -144,6 +144,9 @@  ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd,
 		}
 		break;
 
+	default:
+		printf("unknown module_type 0x%02X\n", spd->module_type);
+		/* assume normal unbuffered DIMM (fallthrough) */
 	case DDR3_SPD_MODULETYPE_UDIMM:
 	case DDR3_SPD_MODULETYPE_SO_DIMM:
 	case DDR3_SPD_MODULETYPE_MICRO_DIMM:
@@ -152,10 +155,6 @@  ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd,
 		if (spd->mod_section.unbuffered.addr_mapping & 0x1)
 			pdimm->mirrored_dimm = 1;
 		break;
-
-	default:
-		printf("unknown module_type 0x%02X\n", spd->module_type);
-		return 1;
 	}
 
 	/* SDRAM device parameters */