[PATCH 2/2] net fec: call fec_init at probe time

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 30 12:30:06 EDT 2012


fec_init() initializes some bits important for phy access, so do
this before the mdiobus is registered. This fixes mdiobus support
on i.MX28 boards in RMII mode.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/net/fec_imx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index f6065aa..21ce38c 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -644,7 +644,6 @@ static int fec_probe(struct device_d *dev)
 	dev->priv = fec;
 	edev->priv = fec;
 	edev->open = fec_open;
-	edev->init = fec_init;
 	edev->send = fec_send;
 	edev->recv = fec_recv;
 	edev->halt = fec_halt;
@@ -685,6 +684,8 @@ static int fec_probe(struct device_d *dev)
 
 	fec->xcv_type = pdata->xcv_type;
 
+	fec_init(edev);
+
 	if (fec->xcv_type != SEVENWIRE) {
 		fec->phy_init = pdata->phy_init;
 		fec->miibus.read = fec_miibus_read;
-- 
1.7.10.4




More information about the barebox mailing list