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

Ira W. Snyder iws at ovro.caltech.edu
Mon Nov 21 19:59:52 CET 2011


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 at ovro.caltech.edu>
Cc: York Sun <yorksun at 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(-)

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 */
-- 
1.7.3.4



More information about the U-Boot mailing list