9
0
Fork 0

net macb: enable Tramsmit and Receive at open

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2013-02-08 10:18:47 +01:00 committed by Sascha Hauer
parent 882ae3da84
commit 044cb6a298
1 changed files with 3 additions and 2 deletions

View File

@ -214,6 +214,9 @@ static int macb_open(struct eth_device *edev)
dev_dbg(macb->dev, "%s\n", __func__);
/* Enable TX and RX */
macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE));
/* Obtain the PHY's address/id */
return phy_device_connect(edev, &macb->miibus, macb->phy_addr,
macb_adjust_link, macb->phy_flags,
@ -259,8 +262,6 @@ static void macb_init(struct macb_device *macb)
#endif
macb_writel(macb, USRIO, val);
/* Enable TX and RX */
macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE));
}
static void macb_halt(struct eth_device *edev)