summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-02-04 11:48:39 -0500
committerTom Rini <trini@ti.com>2014-02-04 11:51:20 -0500
commitf763be224fa78893384416734419d8e052c1c5ef (patch)
treeb69ff86bfbf95516f1609a214164596492eb5213
parent9c1d0e9f16b5718da47018da0a5c3e0eafbff81b (diff)
parent6f9b93723a39dc6d6231c842bb0166bd6258ee53 (diff)
downloadu-boot-imx-f763be224fa78893384416734419d8e052c1c5ef.zip
u-boot-imx-f763be224fa78893384416734419d8e052c1c5ef.tar.gz
u-boot-imx-f763be224fa78893384416734419d8e052c1c5ef.tar.bz2
Merge branch 'net' of git://www.denx.de/git/u-boot-microblaze
-rw-r--r--drivers/net/xilinx_axi_emac.c4
-rw-r--r--drivers/net/zynq_gem.c5
2 files changed, 9 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:
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 6a017a8..381bca4 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -339,6 +339,11 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
phy_config(phydev);
phy_startup(phydev);
+ if (!phydev->link) {
+ printf("%s: No link.\n", phydev->dev->name);
+ return -1;
+ }
+
switch (phydev->speed) {
case SPEED_1000:
writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED1000,