bios/sdram: only show read delays when they are valid.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 19 Dec 2018 10:19:47 +0000 (11:19 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 19 Dec 2018 10:19:47 +0000 (11:19 +0100)
litex/soc/software/bios/sdram.c

index b00f615e4aadf2bf62eb25dc6ffe0c454cc96de6..ef3280de0d0a4613d3937d0c986c6bbc851d6106 100644 (file)
@@ -508,7 +508,10 @@ static void read_level(int module)
        }
        delay_max = delay;
 
-       printf("%02d+-%02d", (delay_min+delay_max)/2, (delay_max-delay_min)/2);
+       if (delay_min >= ERR_DDRPHY_DELAY)
+               printf("-");
+       else
+               printf("%02d+-%02d", (delay_min+delay_max)/2, (delay_max-delay_min)/2);
 
        /* Set delay to the middle */
        ddrphy_rdly_dq_rst_write(1);