diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-03 09:33:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-03 20:07:03 +0200 |
commit | cca17e25bfb7e7cc2b0ab4164561f725969ce36a (patch) | |
tree | d181dd1d1536e15bb19c1ae7928eed016f67297f /arch | |
parent | d04ce5dfe7d2a7502c9a77952164dd6a1e1666a4 (diff) | |
download | barebox-cca17e25bfb7e7cc2b0ab4164561f725969ce36a.tar.gz barebox-cca17e25bfb7e7cc2b0ab4164561f725969ce36a.tar.xz |
ARM mmu: flush page tables in arm_mmu_remap_sdram()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/mmu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 55b07a46d1..607f3572db 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -147,7 +147,7 @@ static int arm_mmu_remap_sdram(struct memory_bank *bank) if ((phys & (SZ_1M - 1)) || (bank->size & (SZ_1M - 1))) return -EINVAL; - ptes = memalign(0x400, num_ptes * sizeof(u32)); + ptes = memalign(PAGE_SIZE, num_ptes * sizeof(u32)); debug("ptes: 0x%p ttb_start: 0x%08lx ttb_end: 0x%08lx\n", ptes, ttb_start, ttb_end); @@ -165,6 +165,9 @@ static int arm_mmu_remap_sdram(struct memory_bank *bank) pte += 256; } + dma_flush_range((unsigned long)ttb, (unsigned long)ttb + 0x4000); + dma_flush_range((unsigned long)ptes, num_ptes * sizeof(u32)); + tlb_invalidate(); return 0; |