9
0
Fork 0

ARM: cache: restore cache functions from the PBL

When using CONFIG_MMU_EARLY combined with CONFIG_PBL_IMAGE, the barebox
setup reuses the MMU setup from the PBL, but doesn't setup the cache
functions.

Set these up to guarantee proper early cache handing before mmu_initcall().

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Andre Heider 2013-10-19 14:18:42 +02:00 committed by Sascha Hauer
parent 2976617635
commit 5611ccb042
1 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,9 @@ static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
endmem &= ~0x3fff;
endmem -= SZ_16K; /* ttb */
if (!IS_ENABLED(CONFIG_PBL_IMAGE)) {
if (IS_ENABLED(CONFIG_PBL_IMAGE)) {
arm_set_cache_functions();
} else {
arm_early_mmu_cache_invalidate();
mmu_early_enable(membase, memsize, endmem);
}