From: Florent Kermarrec Date: Wed, 10 Apr 2019 14:16:47 +0000 (+0200) Subject: software/libnet: add #ifdef on eth_init X-Git-Tag: 24jan2021_ls180~1342 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8dcdb70d27352f801e63d3b95871ddc287582af;p=litex.git software/libnet: add #ifdef on eth_init --- 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)