software/libnet: add #ifdef on eth_init
This commit is contained in:
parent
e475cfbb7d
commit
f8dcdb70d2
|
@ -431,7 +431,7 @@ int main(int i, char **c)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
printf("--========= \e[1mPeripherals init\e[0m ===========--\n");
|
printf("--========= \e[1mPeripherals init\e[0m ===========--\n");
|
||||||
#ifdef CSR_ETHMAC_BASE
|
#ifdef CSR_ETHPHY_CRG_RESET_ADDR
|
||||||
eth_init();
|
eth_init();
|
||||||
#endif
|
#endif
|
||||||
#ifdef CSR_SDRAM_BASE
|
#ifdef CSR_SDRAM_BASE
|
||||||
|
|
|
@ -461,6 +461,7 @@ static void busy_wait(unsigned int ds)
|
||||||
while(timer0_value_read()) timer0_update_value_write(1);
|
while(timer0_value_read()) timer0_update_value_write(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CSR_ETHPHY_CRG_RESET_ADDR
|
||||||
void eth_init(void)
|
void eth_init(void)
|
||||||
{
|
{
|
||||||
ethphy_crg_reset_write(0);
|
ethphy_crg_reset_write(0);
|
||||||
|
@ -471,6 +472,7 @@ void eth_init(void)
|
||||||
ethphy_crg_reset_write(0);
|
ethphy_crg_reset_write(0);
|
||||||
busy_wait(2);
|
busy_wait(2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CSR_ETHPHY_MODE_DETECTION_MODE_ADDR
|
#ifdef CSR_ETHPHY_MODE_DETECTION_MODE_ADDR
|
||||||
void eth_mode(void)
|
void eth_mode(void)
|
||||||
|
|
Loading…
Reference in New Issue