public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core
@ 2010-07-21 17:06 Stefan Roese
  2010-07-23  8:18 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-07-21 17:06 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/cpu/ppc4xx/traps.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/traps.c b/arch/powerpc/cpu/ppc4xx/traps.c
index 1616772..b5562ad 100644
--- a/arch/powerpc/cpu/ppc4xx/traps.c
+++ b/arch/powerpc/cpu/ppc4xx/traps.c
@@ -209,6 +209,22 @@ MachineCheckException(struct pt_regs *regs)
 		/* Clear MCSR */
 		mtspr(SPRN_MCSR, val);
 	}
+
+#if defined(CONFIG_DDR_ECC) && defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
+	/*
+	 * Read and print ECC status register/info:
+	 * The faulting address is only known upon uncorrectable ECC
+	 * errors.
+	 */
+	mfsdram(SDRAM_ECCES, val);
+	if (val & SDRAM_ECCES_CE)
+		printf("ECC: Correctable error\n");
+	if (val & SDRAM_ECCES_UE) {
+		printf("ECC: Uncorrectable error at 0x%02x%08x\n",
+		       mfdcr(SDRAM_ERRADDULL), mfdcr(SDRAM_ERRADDLLL));
+	}
+#endif /* CONFIG_DDR_ECC ... */
+
 #if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
 	mfsdram(DDR0_00, val) ;
 	printf("DDR0: DDR0_00 %lx\n", val);
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] ppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core
  2010-07-21 17:06 [U-Boot] [PATCH] ppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core Stefan Roese
@ 2010-07-23  8:18 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-07-23  8:18 UTC (permalink / raw)
  To: u-boot

On Wednesday 21 July 2010 19:06:26 Stefan Roese wrote:
> Signed-off-by: Stefan Roese <sr@denx.de>

Applied to u-boot-ppc4xx/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-23  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 17:06 [U-Boot] [PATCH] ppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core Stefan Roese
2010-07-23  8:18 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox