From: Anatolij Gustschin Date: Mon, 25 Feb 2008 19:04:20 +0000 (+0100) Subject: POST: Disable cache while SPR POST X-Git-Tag: v1.3.2-rc3~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=60ec654c5eb80d0fe0c38a3bd42140215bc06484;p=u-boot POST: Disable cache while SPR POST 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 --- diff --git a/post/cpu/ppc4xx/spr.c b/post/cpu/ppc4xx/spr.c index c12e378f54..37c95598f5 100644 --- a/post/cpu/ppc4xx/spr.c +++ b/post/cpu/ppc4xx/spr.c @@ -43,6 +43,12 @@ #include +#ifdef CONFIG_4xx_DCACHE +#include + +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; }