9
0
Fork 0

ARM mmu: pickup already enabled mmu

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-01-26 00:08:11 +01:00
parent d2a7bed927
commit 02c0f0bfc8
1 changed files with 8 additions and 1 deletions

View File

@ -276,7 +276,14 @@ static int mmu_init(void)
pte_flags_uncached = PTE_FLAGS_UNCACHED_V4;
}
ttb = memalign(0x10000, 0x4000);
if (get_cr() & CR_M) {
asm volatile ("mrc p15,0,%0,c2,c0,0" : "=r"(ttb));
if (!request_sdram_region("ttb", (unsigned long)ttb, SZ_16K))
pr_err("Error: Can't request SDRAM region for ttb\n");
} else {
ttb = memalign(0x10000, 0x4000);
}
pr_debug("ttb: 0x%p\n", ttb);