Fix build issue where sdram_leveling is not found

4f76656 rewrote how sdram_leveling() was called, leading
to linking problems for targets with sdram but with
write leveling disabled, e.g. ulx3s.
This commit is contained in:
Konrad Beckmann 2020-09-29 22:47:22 +02:00
parent a9234a8793
commit 39d144626b

View file

@ -801,7 +801,9 @@ int sdram_init(void)
ddrctrl_init_error_write(0);
#endif
init_sequence();
#if defined(SDRAM_PHY_WRITE_LEVELING_CAPABLE) || defined(SDRAM_PHY_READ_LEVELING_CAPABLE)
sdram_leveling();
#endif
sdram_software_control_off();
if(!memtest((unsigned int *) MAIN_RAM_BASE, MAIN_RAM_SIZE)) {
#ifdef CSR_DDRCTRL_BASE