diff options
author | Jon Loeliger <jdl@freescale.com> | 2008-01-03 09:46:55 -0600 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2008-01-03 09:46:55 -0600 |
commit | 2c3536425d987bf079258973e2acebaaef3e16b6 (patch) | |
tree | 659d06dd33eca4888e1f6d01d046507b76dc2d27 /post/lib_ppc/cpu.c | |
parent | f743931f9b4d4e15c9bdfe726bef033ea1f1402c (diff) | |
parent | ce37422d0002e10490e268392e0c4e3028e52cec (diff) | |
download | u-boot-2c3536425d987bf079258973e2acebaaef3e16b6.tar.gz |
Merge commit 'wd/master'
Diffstat (limited to 'post/lib_ppc/cpu.c')
-rw-r--r-- | post/lib_ppc/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/post/lib_ppc/cpu.c b/post/lib_ppc/cpu.c index 1f2ded2bf2..4ab6d2dc00 100644 --- a/post/lib_ppc/cpu.c +++ b/post/lib_ppc/cpu.c @@ -36,6 +36,7 @@ #include <watchdog.h> #include <post.h> +#include <asm/mmu.h> #if CONFIG_POST & CFG_POST_CPU @@ -59,6 +60,8 @@ extern int cpu_post_test_multi (void); extern int cpu_post_test_string (void); extern int cpu_post_test_complex (void); +DECLARE_GLOBAL_DATA_PTR; + ulong cpu_post_makecr (long v) { ulong cr = 0; @@ -81,6 +84,10 @@ int cpu_post_test (int flags) WATCHDOG_RESET(); if (ic) icache_disable (); +#ifdef CONFIG_4xx_DCACHE + /* disable cache */ + change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, TLB_WORD2_I_ENABLE); +#endif if (ret == 0) ret = cpu_post_test_cmp (); @@ -129,6 +136,10 @@ int cpu_post_test (int flags) if (ic) icache_enable (); +#ifdef CONFIG_4xx_DCACHE + /* enable cache */ + change_tlb(gd->bd->bi_memstart, gd->bd->bi_memsize, 0); +#endif WATCHDOG_RESET(); |