net: axi_emac: Check if phy was correctly detected

As tsec and fm drivers checking phydev->link
ensure that u-boot don't try access device if link is not ready.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
Michal Simek 2013-11-21 16:15:51 +01:00
parent 4ed4aa20de
commit 6f9b93723a
1 changed files with 4 additions and 0 deletions

View File

@ -261,6 +261,10 @@ static int setup_phy(struct eth_device *dev)
phydev->dev->name);
return 0;
}
if (!phydev->link) {
printf("%s: No link.\n", phydev->dev->name);
return 0;
}
switch (phydev->speed) {
case 1000: