bios/sdram: set init_done/error when DDRCTRL is present (litedram_gen)

This commit is contained in:
Florent Kermarrec 2019-06-22 10:53:12 +02:00
parent d8ac936206
commit 361f9d0dff
1 changed files with 11 additions and 0 deletions

View File

@ -861,6 +861,11 @@ int sdrinit(void)
{
printf("Initializing SDRAM...\n");
#ifdef CSR_DDRCTRL_BASE
ddrctrl_init_done_write(0);
ddrctrl_init_error_write(0);
#endif
init_sequence();
#ifdef CSR_DDRPHY_BASE
#if CSR_DDRPHY_EN_VTC_ADDR
@ -872,7 +877,13 @@ int sdrinit(void)
#endif
#endif
sdrhw();
#ifdef CSR_DDRCTRL_BASE
ddrctrl_init_done_write(1);
#endif
if(!memtest()) {
#ifdef CSR_DDRCTRL_BASE
ddrctrl_init_error_write(1);
#endif
return 0;
}