From: Florent Kermarrec Date: Wed, 27 Jun 2018 13:31:54 +0000 (+0200) Subject: bios/sdram: add write/read leveling scans X-Git-Tag: 24jan2021_ls180~1697 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5ee110e63cdf45c379b76750a48d61e63269e2a;p=litex.git bios/sdram: add write/read leveling scans --- diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index b9fb015c..6b334853 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -222,11 +222,41 @@ void sdrwloff(void) ddrphy_wlevel_en_write(0); } -static int write_level(int *delay, int *high_skew) +static void write_level_scan(void) { int i, j; int dq_address; unsigned char dq; + + printf("Write leveling scan:\n"); + + sdrwlon(); + cdelay(100); + for(i=0;i