From 9fe3a42072519131d3a1c4e7dfb49b033fa28b8b Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 6 Nov 2020 16:11:25 +0100 Subject: [PATCH] software/liblitedra/sdram: minor cleanup, use identical delay after each delay increment. --- litex/soc/software/liblitedram/sdram.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index c8cfbb869..093bb7dc5 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -283,15 +283,15 @@ void sdram_write_leveling_rst_cmd_delay(int show) { } void sdram_write_leveling_force_cmd_delay(int taps, int show) { + int i; _sdram_write_leveling_cmd_scan = 0; _sdram_write_leveling_cmd_delay = taps; if (show) printf("Forcing Cmd delay to %d taps\n", taps); ddrphy_cdly_rst_write(1); - while (taps > 0) { + for (i=0; i