From acb6741b8a49a3ad2e7d68c9b135c8e3de144f39 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 20 Jan 2021 09:27:39 +0100 Subject: [PATCH] software/bios: rename CONFIG_SIM_DISABLE_DELAY to CONFIG_DISABLE_DELAYS and disable timeout on serialboot's check_ack when CONFIG_DISABLE_DELAYS is set. This is useful in simulation to skip serialboot ack check. --- litex/soc/software/bios/boot.c | 4 ++++ litex/soc/software/liblitedram/bist.c | 2 +- litex/soc/software/liblitedram/sdram.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index 7516c0dd6..e5a28f780 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -108,7 +108,11 @@ static int check_ack(void) timer0_en_write(0); timer0_reload_write(0); +#ifndef CONFIG_DISABLE_DELAYS timer0_load_write(CONFIG_CLOCK_FREQUENCY/4); +#else + timer0_load_write(0); +#endif timer0_en_write(1); timer0_update_value_write(1); recognized = 0; diff --git a/litex/soc/software/liblitedram/bist.c b/litex/soc/software/liblitedram/bist.c index 65e2dcf4c..e3dc0028a 100644 --- a/litex/soc/software/liblitedram/bist.c +++ b/litex/soc/software/liblitedram/bist.c @@ -23,7 +23,7 @@ uint32_t rd_errors; __attribute__((unused)) static void cdelay(int i) { -#ifndef CONFIG_SIM_DISABLE_DELAYS +#ifndef CONFIG_DISABLE_DELAYS while(i > 0) { __asm__ volatile(CONFIG_CPU_NOP); i--; diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index e42462173..97d58a566 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -37,7 +37,7 @@ __attribute__((unused)) static void cdelay(int i) { -#ifndef CONFIG_SIM_DISABLE_DELAYS +#ifndef CONFIG_DISABLE_DELAYS while(i > 0) { __asm__ volatile(CONFIG_CPU_NOP); i--; @@ -348,7 +348,7 @@ static void sdram_write_leveling_rst_delay(int module) { for(i=0; i