[PATCH 1/1] designware: fix 100mps phy support
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sun Oct 14 10:23:18 EDT 2012
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/net/designware.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 63b199f..7eadd92 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -244,6 +244,16 @@ static void dwc_update_linkspeed(struct eth_device *edev)
conf &= ~MII_PORTSELECT;
else
conf |= MII_PORTSELECT;
+
+ if ((edev->phydev->interface != PHY_INTERFACE_MODE_MII) &&
+ (edev->phydev->interface != PHY_INTERFACE_MODE_GMII)) {
+
+ if (edev->phydev->speed == 100)
+ conf |= FES_100;
+ else
+ conf &= ~FES_100;
+ }
+
writel(conf, &mac_p->conf);
}
--
1.7.10.4
More information about the barebox
mailing list