From fd6162c87f490581e18400b33996e3a2baa1dcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Sowi=C5=84ski?= Date: Wed, 10 Nov 2021 14:01:15 +0100 Subject: [PATCH] Make use of _sdram_write_leveling_bitslips in write latency calibration only for write leveling capable targets --- litex/soc/software/liblitedram/sdram.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index 2828f3560..e3af84a02 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -1045,10 +1045,14 @@ static void sdram_write_latency_calibration(void) { } } + #ifdef SDRAM_PHY_WRITE_LEVELING_CAPABLE if (_sdram_write_leveling_bitslips[module] < 0) bitslip = best_bitslip; else bitslip = _sdram_write_leveling_bitslips[module]; + #else + bitslip = best_bitslip; + #endif if (bitslip == -1) printf("m%d:- ", module); else