From: Florent Kermarrec Date: Sat, 25 Apr 2020 10:51:33 +0000 (+0200) Subject: bios/sdram: reduce number of scan loops during cdly scan to speed it up. X-Git-Tag: 24jan2021_ls180~434 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96e7e6e89a7972a43f5808d8b76691bfa1169bea;p=litex.git bios/sdram: reduce number of scan loops during cdly scan to speed it up. --- diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index ff4e8f40..00c540ae 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -310,7 +310,7 @@ static void write_delay_inc(int module) { ddrphy_dly_sel_write(0); } -static int write_level_scan(int *delays, int show) +static int write_level_scan(int *delays, int loops, int show) { int i, j, k; @@ -345,7 +345,7 @@ static int write_level_scan(int *delays, int show) #if SDRAM_PHY_DELAYS > 32 show_iter = (j%16 == 0) && show; #endif - for (k=0; k<128; k++) { + for (k=0; k= 0; @@ -1073,7 +1073,7 @@ int sdrlevel(void) } else { /* use only the current cdly */ int delays[SDRAM_PHY_MODULES]; - write_level_scan(delays, 1); + write_level_scan(delays, 128, 1); } #endif