public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST
@ 2010-11-26 14:45 Stefan Roese
  2010-11-28 10:07 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2010-11-26 14:45 UTC (permalink / raw)
  To: u-boot

This patch fixes a problem in the Denali (440EPx) SDRAM ECC POST test.
When cache is enabled in the SDRAM area, the values written to SDRAM
need to be flushed from cache to SDRAM using the dcfb instruction.

Without this patch the POST ECC test failed. Now its working again on
platforms with cache enabled in SDRAM.

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

diff --git a/post/cpu/ppc4xx/denali_ecc.c b/post/cpu/ppc4xx/denali_ecc.c
index 50ae7fb..6d14635 100644
--- a/post/cpu/ppc4xx/denali_ecc.c
+++ b/post/cpu/ppc4xx/denali_ecc.c
@@ -174,6 +174,7 @@ static int test_ecc(uint32_t ecc_addr)
 	clear_and_enable_ecc();
 	out_be32(ecc_mem, ECC_PATTERN);
 	out_be32(ecc_mem + 1, ECC_PATTERN);
+	ppcDcbf((u32)ecc_mem);
 
 	/* Verify no ECC error reading back */
 	value = in_be32(ecc_mem);
@@ -193,6 +194,7 @@ static int test_ecc(uint32_t ecc_addr)
 
 	/* Test for correctable error by creating a one-bit error */
 	out_be32(ecc_mem, ECC_PATTERN_CORR);
+	ppcDcbf((u32)ecc_mem);
 	clear_and_enable_ecc();
 	value = in_be32(ecc_mem);
 	disable_ecc();
@@ -212,6 +214,7 @@ static int test_ecc(uint32_t ecc_addr)
 
 	/* Test for uncorrectable error by creating a two-bit error */
 	out_be32(ecc_mem, ECC_PATTERN_UNCORR);
+	ppcDcbf((u32)ecc_mem);
 	clear_and_enable_ecc();
 	value = in_be32(ecc_mem);
 	disable_ecc();
@@ -232,6 +235,7 @@ static int test_ecc(uint32_t ecc_addr)
 
 	/* Remove error from SDRAM and enable ECC. */
 	out_be32(ecc_mem, ECC_PATTERN);
+	ppcDcbf((u32)ecc_mem);
 	clear_and_enable_ecc();
 
 	return ret;
-- 
1.7.3.2

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

* [U-Boot] [PATCH] ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST
  2010-11-26 14:45 [U-Boot] [PATCH] ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST Stefan Roese
@ 2010-11-28 10:07 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-11-28 10:07 UTC (permalink / raw)
  To: u-boot

On Friday 26 November 2010 15:45:22 Stefan Roese wrote:
> This patch fixes a problem in the Denali (440EPx) SDRAM ECC POST test.
> When cache is enabled in the SDRAM area, the values written to SDRAM
> need to be flushed from cache to SDRAM using the dcfb instruction.
> 
> Without this patch the POST ECC test failed. Now its working again on
> platforms with cache enabled in SDRAM.

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-11-28 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 14:45 [U-Boot] [PATCH] ppc4xx/POST: Handle cached SDRAM correctly in Denali (440EPx) ECC POST Stefan Roese
2010-11-28 10:07 ` Stefan Roese

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