diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-01-26 00:08:11 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-04 15:52:41 +0100 |
commit | 02c0f0bfc8a7ec0070402c73290a18e0e7f5efbe (patch) | |
tree | c0cffa9fc7be2033da681da0243f64a3144925a3 /arch/arm/cpu | |
parent | d2a7bed927eb853f36c8909ed0d4fcee878a3f49 (diff) | |
download | barebox-02c0f0bfc8a7ec0070402c73290a18e0e7f5efbe.tar.gz barebox-02c0f0bfc8a7ec0070402c73290a18e0e7f5efbe.tar.xz |
ARM mmu: pickup already enabled mmu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/mmu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 8f9a43e040..73dd0d397b 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -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); |