summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-09-04 11:50:25 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2013-09-04 11:50:25 +0200
commit4eef93da262048eb1118e726b3ec5b8ebd3c6c91 (patch)
tree8a28287e405742086f6df380ee558265d17cf3f6 /drivers/net
parent31043e20ae748635f142483e8b7b645948687055 (diff)
parentbc6958988726977b4089da1b13f6467e8e28efd2 (diff)
downloadu-boot-imx-4eef93da262048eb1118e726b3ec5b8ebd3c6c91.zip
u-boot-imx-4eef93da262048eb1118e726b3ec5b8ebd3c6c91.tar.gz
u-boot-imx-4eef93da262048eb1118e726b3ec5b8ebd3c6c91.tar.bz2
Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/macb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 1f7cc32..bf3983a 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -36,6 +36,7 @@
#include <asm/io.h>
#include <asm/dma-mapping.h>
#include <asm/arch/clk.h>
+#include <asm-generic/errno.h>
#include "macb.h"
@@ -397,9 +398,14 @@ static int macb_phy_init(struct macb_device *macb)
}
#ifdef CONFIG_PHYLIB
- phydev->bus = macb->bus;
- phydev->dev = netdev;
- phydev->addr = macb->phy_addr;
+ /* need to consider other phy interface mode */
+ phydev = phy_connect(macb->bus, macb->phy_addr, netdev,
+ PHY_INTERFACE_MODE_RGMII);
+ if (!phydev) {
+ printf("phy_connect failed\n");
+ return -ENODEV;
+ }
+
phy_config(phydev);
#endif