From df7e5dbcf66f98271eb6c3e12744ec794fb1778e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 19 Jul 2018 12:52:00 +0200 Subject: [PATCH] bios/sdram: add ERR_DDRPH_BITSLIP constant and some cleanup --- litex/soc/software/bios/sdram.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index cd06491a..59cfa8a9 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -203,6 +203,7 @@ void sdrwr(char *startaddr) #else #define ERR_DDRPHY_DELAY 32 #endif +#define ERR_DDRPHY_BITSLIP 8 #ifdef CSR_DDRPHY_WLEVEL_EN_ADDR @@ -748,14 +749,15 @@ int sdrlevel(void) return 0; #endif /* check for optimal read leveling window */ - for(i=0; i<8; i++) { - if (read_level_scan(1)) { + for(i=0; i