[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348773574-30318-1-git-send-email-zonque@gmail.com>
Date: Thu, 27 Sep 2012 21:19:34 +0200
From: Daniel Mack <zonque@...il.com>
To: netdev@...r.kernel.org
Cc: Daniel Mack <zonque@...il.com>,
Mugunthan V N <mugunthanvnm@...com>,
Vaibhav Hiremath <hvaibhav@...com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH v2] net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL
For RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the
IFCTL_A bits in the MACCONTROL register. For all other PHY modes, this
bit is unused, so setting it unconditionally shouldn't cause any
trouble.
Signed-off-by: Daniel Mack <zonque@...il.com>
Cc: Mugunthan V N <mugunthanvnm@...com>
Cc: Vaibhav Hiremath <hvaibhav@...com>
Cc: David S. Miller <davem@...emloft.net>
---
drivers/net/ethernet/ti/cpsw.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index aa78168..fb1a692 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -386,6 +386,11 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
mac_control |= BIT(7); /* GIGABITEN */
if (phy->duplex)
mac_control |= BIT(0); /* FULLDUPLEXEN */
+
+ /* set speed_in input in case RMII mode is used in 100Mbps */
+ if (phy->speed == 100)
+ mac_control |= BIT(15);
+
*link = true;
} else {
mac_control = 0;
--
1.7.11.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists