]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
omap: Remove hardcoding of mmu section shift to 20
authorKeerthy <j-keerthy@ti.com>
Wed, 14 Sep 2016 05:13:28 +0000 (10:43 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 7 Oct 2016 00:57:43 +0000 (20:57 -0400)
As of now the mmu section shift is hardcoded to 20 but with LPAE
coming into picture this can be different. Hence replacing 20 with
MMU_SECTION_SHIFT macro.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/omap-common/omap-cache.c

index 579bebf93fead49ff0c30d4f95b606a203ba7bb6..ee89f1fbbc897f24f2a52a1e31170235f3e3a88d 100644 (file)
@@ -32,8 +32,8 @@ void dram_bank_mmu_setup(int bank)
        bd_t *bd = gd->bd;
        int     i;
 
-       u32 start = bd->bi_dram[bank].start >> 20;
-       u32 size = bd->bi_dram[bank].size >> 20;
+       u32 start = bd->bi_dram[bank].start >> MMU_SECTION_SHIFT;
+       u32 size = bd->bi_dram[bank].size >> MMU_SECTION_SHIFT;
        u32 end = start + size;
 
        debug("%s: bank: %d\n", __func__, bank);