[U-Boot] [PATCH] net: allow fix speed for FEC driver
Stefano Babic
sbabic at denx.de
Mon Jun 6 11:17:33 CEST 2016
Sometimes the MII is not used at all - for example,
when the controller is connected to a switch with
a fixed speed, and the MDC/MDIO signal are used
for something else.
Allow to set a fixed speed in the FEC driver
without relying on the autonegotiation.
Signed-off-by: Stefano Babic <sbabic at denx.de>
---
The use case is the FEC connected to a Switch
without using MDIO / MDC. The FEC has no way to
get the speed.
drivers/net/fec_mxc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 88b247c..40795cf 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -502,10 +502,11 @@ static int fec_open(struct eth_device *edev)
}
speed = fec->phydev->speed;
}
+#ifdef CONFIG_FEC_FIXED_SPEED
+ speed = CONFIG_FEC_FIXED_SPEED;
+#endif
#else
-#if 0
miiphy_wait_aneg(edev);
-#endif
speed = miiphy_speed(edev->name, fec->phy_id);
miiphy_duplex(edev->name, fec->phy_id);
#endif
--
1.9.1
More information about the U-Boot
mailing list