9
0
Fork 0

arm: use processor specififc functions to turn off MMU

The way it was done before does not work on Cortex processors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Orjan Friberg <of@flatfrog.com>
Tested-by: Luca Ceresoli <list@lucaceresoli.net>
This commit is contained in:
Sascha Hauer 2010-06-10 14:19:43 +02:00
parent fa9153df32
commit ce971c2367
1 changed files with 11 additions and 4 deletions

View File

@ -75,12 +75,19 @@ void arch_shutdown(void)
int i;
#ifdef CONFIG_MMU
/* nearly the same as below, but this could also disable
* second level cache.
*/
mmu_disable();
#else
asm volatile (
"bl __mmu_cache_flush;"
"bl __mmu_cache_off;"
:
:
: "r0", "r1", "r2", "r3", "r6", "r10", "r12", "cc", "memory"
);
#endif
/* flush I/D-cache */
i = 0;
asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i));
}
/**