software/libnet: add #ifdef on eth_init
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 10 Apr 2019 14:16:47 +0000 (16:16 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 10 Apr 2019 14:16:47 +0000 (16:16 +0200)
litex/soc/software/bios/main.c
litex/soc/software/libnet/microudp.c

index ba75f38c9bfdaf600f51d004539334d1c5e691f4..26ca39838b76d34db59c88008dc4a554db1e189c 100644 (file)
@@ -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
index 38e16588bd0d4ede15cc172e1c466c63db0c9e78..1850a274ac9dca576a29d315c8ec567beea47a9a 100644 (file)
@@ -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)