ddr: socfpga: Add ECC DRAM scrubbing support for gen5
Subsystems (3)
PATCH 1/1 ddr: socfpga: Add ECC DRAM scrubbing support for gen5
From: Tien Fong Chee <[email protected]>
The SDRAM must first be rewritten by zeroes if ECC is used to initialize the ECC metadata. Make the CPU overwrite the DRAM with zeroes in such a case. This scrubbing implementation turns the caches on temporarily, then
overwrites the whole RAM with zeroes, flushes the caches and turns them off again. This provides satisfactory performance.
Signed-off-by Tien Fong Chee <[email protected]>
Signed-off-by Teik Heng Chong <[email protected]>
--- arch/arm/mach-socfpga/spl_gen5.c | 4 +++ drivers/ddr/altera/sdram_gen5.c | 57 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
arch/arm/mach-socfpga/spl_gen5.c +4 -0
@@ -29,6 +29,8 @@DECLARE_GLOBAL_DATA_PTR ; +static struct bd_info bdata __section(".data"); +u32 spl_boot_device (void ) { const u32 bsel = readl(socfpga_get_sysmgr_addr() +
@@ -148,6 +150,8 @@ void board_init_f(ulong dummy)/* enable console uart printing */ preloader_console_init (); + gd->bd = &bdata; + ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret) {debug ("DRAM init failed: %d\n" , ret);
drivers/ddr/altera/sdram_gen5.c +57 -0
85 lines not on this page · raw message
Signature · 1 line
2.26.2