mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software/liblitedram: add optional SDRAM_TEST_DISABLE that can be defined to full disable SDRAM test.
This is useful in simulation where SDRAM contents is pre-initialized from files (ex Linux-on-LiteX-Vexriscv).
This commit is contained in:
parent
12dabde77c
commit
d90d3e043b
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "sdram.h"
|
||||
|
||||
//#define SDRAM_TEST_DISABLE
|
||||
|
||||
#ifdef CSR_SDRAM_BASE
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
|
@ -1014,6 +1016,7 @@ int sdram_init(void)
|
|||
sdram_leveling();
|
||||
#endif
|
||||
sdram_software_control_off();
|
||||
#ifndef SDRAM_TEST_DISABLE
|
||||
if(!memtest((unsigned int *) MAIN_RAM_BASE, MEMTEST_DATA_SIZE)) {
|
||||
#ifdef CSR_DDRCTRL_BASE
|
||||
ddrctrl_init_done_write(1);
|
||||
|
@ -1022,6 +1025,7 @@ int sdram_init(void)
|
|||
return 0;
|
||||
}
|
||||
memspeed((unsigned int *) MAIN_RAM_BASE, MEMTEST_DATA_SIZE, false);
|
||||
#endif
|
||||
#ifdef CSR_DDRCTRL_BASE
|
||||
ddrctrl_init_done_write(1);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue