aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7300_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-08-27 08:16:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-30 13:56:52 -0400
commit15154c57c62494292f43df9133a7b370cbbf1ecb (patch)
treef09c89b63f11ea4d28d867ce6990e702879dbb27 /drivers/edac/i7300_edac.c
parentbb81a21637f84e2192bf327575645a7843c70cdb (diff)
i7300_edac: Properly detect the type of error correction
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7300_edac.c')
-rw-r--r--drivers/edac/i7300_edac.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index a88742abf1f4..b5152256967f 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -450,14 +450,24 @@ static int decode_mtr(struct i7300_pvt *pvt,
450 p_csrow->mtype = MEM_FB_DDR2; 450 p_csrow->mtype = MEM_FB_DDR2;
451 451
452 /* 452 /*
453 * FIXME: the type of error detection actually depends of the 453 * The type of error detection actually depends of the
454 * mode of operation. When it is just one single memory chip, at 454 * mode of operation. When it is just one single memory chip, at
455 * socket 0, channel 0, it uses 8-byte-over-32-byte SECDED+ code. 455 * socket 0, channel 0, it uses 8-byte-over-32-byte SECDED+ code.
456 * In normal or mirrored mode, it uses Single Device Data correction, 456 * In normal or mirrored mode, it uses Lockstep mode,
457 * with the possibility of using an extended algorithm for x8 memories 457 * with the possibility of using an extended algorithm for x8 memories
458 * See datasheet Sections 7.3.6 to 7.3.8 458 * See datasheet Sections 7.3.6 to 7.3.8
459 */ 459 */
460 p_csrow->edac_mode = EDAC_S8ECD8ED; 460
461 if (IS_SINGLE_MODE(pvt->mc_settings_a)) {
462 p_csrow->edac_mode = EDAC_SECDED;
463 debugf0("ECC code is 8-byte-over-32-byte SECDED+ code\n");
464 } else {
465 debugf0("ECC code is on Lockstep mode\n");
466 if (MTR_DRAM_WIDTH(mtr))
467 p_csrow->edac_mode = EDAC_S8ECD8ED;
468 else
469 p_csrow->edac_mode = EDAC_S4ECD4ED;
470 }
461 471
462 /* ask what device type on this row */ 472 /* ask what device type on this row */
463 if (MTR_DRAM_WIDTH(mtr)) { 473 if (MTR_DRAM_WIDTH(mtr)) {