From 9d4b7cd5156a222bb68a6f89d852054889357f1c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 14 Aug 2019 19:09:58 +0200 Subject: [PATCH] bios/sdram: set init done after memtest (for standalone LiteDRAM controllers) --- litex/soc/software/bios/sdram.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index ecf5fe5a1..03dc2b134 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -891,15 +891,16 @@ int sdrinit(void) #endif #endif sdrhw(); -#ifdef CSR_DDRCTRL_BASE - ddrctrl_init_done_write(1); -#endif if(!memtest()) { #ifdef CSR_DDRCTRL_BASE + ddrctrl_init_done_write(1); ddrctrl_init_error_write(1); #endif return 0; } +#ifdef CSR_DDRCTRL_BASE + ddrctrl_init_done_write(1); +#endif return 1; }