From f8dcdb70d27352f801e63d3b95871ddc287582af Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 10 Apr 2019 16:16:47 +0200 Subject: [PATCH] software/libnet: add #ifdef on eth_init --- litex/soc/software/bios/main.c | 2 +- litex/soc/software/libnet/microudp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index ba75f38c..26ca3983 100644 --- a/litex/soc/software/bios/main.c +++ b/litex/soc/software/bios/main.c @@ -431,7 +431,7 @@ int main(int i, char **c) printf("\n"); printf("--========= \e[1mPeripherals init\e[0m ===========--\n"); -#ifdef CSR_ETHMAC_BASE +#ifdef CSR_ETHPHY_CRG_RESET_ADDR eth_init(); #endif #ifdef CSR_SDRAM_BASE diff --git a/litex/soc/software/libnet/microudp.c b/litex/soc/software/libnet/microudp.c index 38e16588..1850a274 100644 --- a/litex/soc/software/libnet/microudp.c +++ b/litex/soc/software/libnet/microudp.c @@ -461,6 +461,7 @@ static void busy_wait(unsigned int ds) while(timer0_value_read()) timer0_update_value_write(1); } +#ifdef CSR_ETHPHY_CRG_RESET_ADDR void eth_init(void) { ethphy_crg_reset_write(0); @@ -471,6 +472,7 @@ void eth_init(void) ethphy_crg_reset_write(0); busy_wait(2); } +#endif #ifdef CSR_ETHPHY_MODE_DETECTION_MODE_ADDR void eth_mode(void) -- 2.30.2