From 5681a3c1a9a842460db8ba4a13e44d692d3aa89b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 8 Jan 2018 12:04:33 +0100 Subject: [PATCH] bios/sdram: revert capability to do manual read leveling since still needed with some targets --- litex/soc/software/bios/sdram.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index ba1bd216d..d9e3023d0 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -598,7 +598,33 @@ int memtest(void) } #ifdef CSR_DDRPHY_BASE -int sdrlevel(void) +#ifdef READ_LEVELING_BITSLIP +int sdrlevel(void) /* manual */ +{ + int bitslip, delay, module; + int i; + sdram_dfii_control_write(DFII_CONTROL_SEL); + for(module=0; module<8; module++) { + ddrphy_dly_sel_write(1<