software/liblitedram: Make sure init_error is set before init_done.

Useful for standalone core where the user logic can be looking at init_done/init_error to
condition user accesses.
This commit is contained in:
Florent Kermarrec 2021-03-10 19:41:02 +01:00
parent da1277021a
commit 26f55797cc
1 changed files with 1 additions and 1 deletions

View File

@ -1042,8 +1042,8 @@ int sdram_init(void)
#ifndef SDRAM_TEST_DISABLE
if(!memtest((unsigned int *) MAIN_RAM_BASE, MEMTEST_DATA_SIZE)) {
#ifdef CSR_DDRCTRL_BASE
ddrctrl_init_done_write(1);
ddrctrl_init_error_write(1);
ddrctrl_init_done_write(1);
#endif
return 0;
}