summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2013-11-21 16:15:51 +0100
committerMichal Simek <michal.simek@xilinx.com>2014-02-04 16:42:45 +0100
commit6f9b93723a39dc6d6231c842bb0166bd6258ee53 (patch)
tree2039b5daf76023f3af3c25a3f7525ede25ecf9af /drivers/net
parent4ed4aa20de50661de89dbe7896595e2b0bf44d5c (diff)
downloadu-boot-imx-6f9b93723a39dc6d6231c842bb0166bd6258ee53.zip
u-boot-imx-6f9b93723a39dc6d6231c842bb0166bd6258ee53.tar.gz
u-boot-imx-6f9b93723a39dc6d6231c842bb0166bd6258ee53.tar.bz2
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/xilinx_axi_emac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index bb5044b..262b67b 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -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: