software/liblitedram/sdram/sdram_write_leveling_find_cmd_delay: Only update best_count when error < best_error.
This commit is contained in:
parent
c50989be8e
commit
19d16fa27f
|
@ -552,10 +552,10 @@ static void sdram_write_leveling_find_cmd_delay(unsigned int *best_error, unsign
|
|||
error *= -1;
|
||||
|
||||
if (delay_count >= *best_count) {
|
||||
*best_count = delay_count;
|
||||
if (error < *best_error) {
|
||||
*best_cdly = cdly;
|
||||
*best_error = error;
|
||||
*best_count = delay_count;
|
||||
}
|
||||
}
|
||||
#ifdef SDRAM_WRITE_LEVELING_CMD_DELAY_DEBUG
|
||||
|
|
Loading…
Reference in New Issue