From: Florent Kermarrec Date: Sat, 22 Jun 2019 08:53:12 +0000 (+0200) Subject: bios/sdram: set init_done/error when DDRCTRL is present (litedram_gen) X-Git-Tag: 24jan2021_ls180~1153 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=361f9d0dff867f0c7597f3e87443da973eb4fc97;p=litex.git bios/sdram: set init_done/error when DDRCTRL is present (litedram_gen) --- diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index 948f2cbf..eeee93ba 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -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; }