From 39d144626b83143ce6fa89b0e1d1ff03bebf8390 Mon Sep 17 00:00:00 2001 From: Konrad Beckmann Date: Tue, 29 Sep 2020 22:47:22 +0200 Subject: [PATCH] Fix build issue where sdram_leveling is not found 4f76656 rewrote how sdram_leveling() was called, leading to linking problems for targets with sdram but with write leveling disabled, e.g. ulx3s. --- litex/soc/software/liblitedram/sdram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index 8fb65b0d6..0d55db41f 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -801,7 +801,9 @@ int sdram_init(void) ddrctrl_init_error_write(0); #endif init_sequence(); +#if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) || defined(SDRAM_PHY_READ_LEVELING_CAPABLE) sdram_leveling(); +#endif sdram_software_control_off(); if(!memtest((unsigned int *) MAIN_RAM_BASE, MAIN_RAM_SIZE)) { #ifdef CSR_DDRCTRL_BASE