Skip to contentSkip to conversation

ddr: altera: Drop custom dram_bank_mmu_setup() on Arria10

PATCH New Marek Vasut 2 participants 2 messages May 29, 2018 – May 31, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ddr: altera: Drop custom dram_bank_mmu_setup() on Arria10

This function was never used in SPL and the default implementation of dram_bank_mmu_setup() does the same thing. The only difference is the part which configures OCRAM as cachable, which doesn't really work as it covers more than the OCRAM.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
---
 drivers/ddr/altera/sdram_arria10.c | 25 -------------------------
 1 file changed, 25 deletions(-)
drivers/ddr/altera/sdram_arria10.c +0 -25
index 706a038b88..1f2b7f4819 100644
@@ -713,28 +713,3 @@ int ddr_calibration_sequence(void)
 
 	return 0;
 }
-
-void dram_bank_mmu_setup(int bank)
-{
-	bd_t *bd = gd->bd;
-	int	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++) {
-#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
-		set_section_dcache(i, DCACHE_WRITETHROUGH);
-#else
-		set_section_dcache(i, DCACHE_WRITEBACK);
-#endif
-	}
-
-	/* same as above but just that we would want cacheable for ocram too */
-	i = CONFIG_SYS_INIT_RAM_ADDR >> 20;
-#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
-	set_section_dcache(i, DCACHE_WRITETHROUGH);
-#else
-	set_section_dcache(i, DCACHE_WRITEBACK);
-#endif
-}
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 ddr: altera: Drop custom dram_bank_mmu_setup() on Arria10

Quoted 5 lines · Marek Vasut

This function was never used in SPL and the default implementation of dram_bank_mmu_setup() does the same thing. The only difference is the part which configures OCRAM as cachable, which doesn't really work as it covers more than the OCRAM.

Quoted 7 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>

---
 drivers/ddr/altera/sdram_arria10.c | 25 -------------------------

 1 file changed, 25 deletions(-)

Thanks
Chin Liang