From: Florent Kermarrec Date: Fri, 12 Apr 2019 15:15:09 +0000 (+0200) Subject: software/libnet/microudp: cleanup eth_init X-Git-Tag: 24jan2021_ls180~1335 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3441eb05cb9c4d9b027cfdca5a61b0f0c8884ec7;p=litex.git software/libnet/microudp: cleanup eth_init --- diff --git a/litex/soc/software/libnet/microudp.c b/litex/soc/software/libnet/microudp.c index 9c120212..50107b93 100644 --- a/litex/soc/software/libnet/microudp.c +++ b/litex/soc/software/libnet/microudp.c @@ -453,18 +453,15 @@ 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); - busy_wait(2); - /* that pesky ethernet PHY needs two resets at times... */ +#ifdef CSR_ETHPHY_CRG_RESET_ADDR ethphy_crg_reset_write(1); busy_wait(2); ethphy_crg_reset_write(0); busy_wait(2); -} #endif +} #ifdef CSR_ETHPHY_MODE_DETECTION_MODE_ADDR void eth_mode(void)