* [U-Boot-Users] [PATCH] POST: Disable cache while SPR POST
@ 2008-02-25 19:04 Anatolij Gustschin
2008-03-02 20:34 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Anatolij Gustschin @ 2008-02-25 19:04 UTC (permalink / raw)
To: u-boot
Currently (since commit b2e2142c) u-boot crashes on
sequoia board while SPR test if CONFIG_4xx_DCACHE is
enabled. This patch disables the cache while SPR test.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
post/cpu/ppc4xx/spr.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/post/cpu/ppc4xx/spr.c b/post/cpu/ppc4xx/spr.c
index c12e378..37c9559 100644
--- a/post/cpu/ppc4xx/spr.c
+++ b/post/cpu/ppc4xx/spr.c
@@ -43,6 +43,12 @@
#include <asm/processor.h>
+#ifdef CONFIG_4xx_DCACHE
+#include <asm/mmu.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
static struct {
int number;
char * name;
@@ -164,6 +170,10 @@ int spr_post_test (int flags)
};
unsigned long (*get_spr) (void) = (void *) code;
+#ifdef CONFIG_4xx_DCACHE
+ /* disable cache */
+ change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, TLB_WORD2_I_ENABLE);
+#endif
for (i = 0; i < spr_test_list_size; i++) {
int num = spr_test_list[i].number;
@@ -180,6 +190,10 @@ int spr_post_test (int flags)
ret = -1;
}
}
+#ifdef CONFIG_4xx_DCACHE
+ /* enable cache */
+ change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0);
+#endif
return ret;
}
--
1.5.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot-Users] [PATCH] POST: Disable cache while SPR POST
2008-02-25 19:04 [U-Boot-Users] [PATCH] POST: Disable cache while SPR POST Anatolij Gustschin
@ 2008-03-02 20:34 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-03-02 20:34 UTC (permalink / raw)
To: u-boot
In message <47C31134.5080406@denx.de> you wrote:
> Currently (since commit b2e2142c) u-boot crashes on
> sequoia board while SPR test if CONFIG_4xx_DCACHE is
> enabled. This patch disables the cache while SPR test.
>
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
> post/cpu/ppc4xx/spr.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Man did not weave the web of life; he is merely a strand in it.
Whatever he does to the web, he does to himself. - Seattle [1854]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-02 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-25 19:04 [U-Boot-Users] [PATCH] POST: Disable cache while SPR POST Anatolij Gustschin
2008-03-02 20:34 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox