Merge "ubi: fix data aborts in case of NAND bit flips during block read"
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index b044bd3..e8e26db 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -69,11 +69,11 @@
 __weak void dram_bank_mmu_setup(int bank)
 {
 	bd_t *bd = gd->bd;
-	int	i;
+	unsigned long long	i;
 
 	debug("%s: bank: %d\n", __func__, bank);
 	for (i = bd->bi_dram[bank].start >> 20;
-	     i < (bd->bi_dram[bank].start + bd->bi_dram[bank].size) >> 20;
+	     i < ((unsigned long long)bd->bi_dram[bank].start + (unsigned long long)bd->bi_dram[bank].size) >> 20;
 	     i++) {
 		/* Set XN bit for all dram regions except uboot code region */
 		if (i >= (CONFIG_SYS_TEXT_BASE >> 20) && i < ((CONFIG_SYS_TEXT_BASE + 0x100000) >> 20))