ARM: no need to call cache functions when MMU is disabled
Without MMU enabled we do not need to call __mmu_cache_* as the caches are not enabled. Calling flush_icache() before jumping to new code is enough. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
9243875971
commit
3d76ff9aea
|
@ -30,6 +30,7 @@
|
||||||
#include <asm/memory.h>
|
#include <asm/memory.h>
|
||||||
#include <asm/system_info.h>
|
#include <asm/system_info.h>
|
||||||
#include <asm/cputype.h>
|
#include <asm/cputype.h>
|
||||||
|
#include <asm/cache.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable processor's instruction cache
|
* Enable processor's instruction cache
|
||||||
|
@ -74,19 +75,9 @@ int icache_status(void)
|
||||||
void arch_shutdown(void)
|
void arch_shutdown(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
/* nearly the same as below, but this could also disable
|
|
||||||
* second level cache.
|
|
||||||
*/
|
|
||||||
mmu_disable();
|
mmu_disable();
|
||||||
#else
|
|
||||||
asm volatile (
|
|
||||||
"bl __mmu_cache_flush;"
|
|
||||||
"bl __mmu_cache_off;"
|
|
||||||
:
|
|
||||||
:
|
|
||||||
: "r0", "r1", "r2", "r3", "r6", "r10", "r12", "lr", "cc", "memory"
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
|
flush_icache();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_THUMB2_BAREBOX
|
#ifdef CONFIG_THUMB2_BAREBOX
|
||||||
|
|
Loading…
Reference in New Issue