From 3f86cf9693f8b98c44999e81d4067943c634b421 Mon Sep 17 00:00:00 2001 From: Fred Fan Date: Thu, 19 Nov 2009 16:43:08 +0800 Subject: ENGR00118579 Enable MMU To enable MMU, it is porting from redboot. Enable MMU and enable I/D cache. Signed-off-by:Fred Fan --- cpu/arm1136/mx35/generic.c | 9 +++++++++ cpu/arm1136/start.S | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'cpu/arm1136') diff --git a/cpu/arm1136/mx35/generic.c b/cpu/arm1136/mx35/generic.c index 31bcbec..fbe9084 100644 --- a/cpu/arm1136/mx35/generic.c +++ b/cpu/arm1136/mx35/generic.c @@ -372,3 +372,12 @@ int cpu_eth_init(bd_t *bis) #endif return rc; } + +#if defined(CONFIG_ARCH_CPU_INIT) +int arch_cpu_init(void) +{ + icache_enable(); + dcache_enable(); + return 0; +} +#endif diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S index b1d7087..2da16e7 100644 --- a/cpu/arm1136/start.S +++ b/cpu/arm1136/start.S @@ -251,7 +251,9 @@ clbss_l:str r2, [r0] /* clear loop... */ cmp r0, r1 bne clbss_l #endif - +#ifdef CONFIG_ARCH_MMU + bl board_mmu_init +#endif ldr pc, _start_armboot #ifdef CONFIG_NAND_SPL -- cgit v1.1