diff options
author | Tom Rini <trini@ti.com> | 2013-09-06 20:25:35 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-09-06 20:25:35 -0400 |
commit | 47f75cf2e1d8648e3438630f3a4bddf9b5caa25d (patch) | |
tree | 1d0f8f8943d44245381f255a059e258c696bc5a8 /drivers/net/macb.c | |
parent | 1affd4d4a3fe512050e1ad1636d9360c670da531 (diff) | |
parent | 68e1747f9c0506159e8ecc9a4feb58e9c65a7b39 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 1f7cc322e05..bf3983a00c6 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 |