net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL
Subsystems (3)
PATCH 1/1 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.
--- drivers/net/ethernet/ti/cpsw.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/ethernet/ti/cpsw.c +5 -0
@@ -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 >10Mbps */ +if (phy->speed >10 ) + mac_control |=BIT (15 ); + *link = true; }else { mac_control =0 ;
Signature · 1 line
1.7.11.4
Quoted 26 lines
-----Original Message-----
From: Daniel Mack [mailto:[email protected]]
Sent: Thursday, September 27, 2012 5:21 PM
To: [email protected]
Cc: Daniel Mack; N, Mugunthan V; Hiremath, Vaibhav; David S. Miller
Subject: [PATCH] net: ti cpsw ethernet: setIFCTL_Abit in MACCONTROLFor RMII/RGMII mode operation in 100Mbps, the CPSW needs to set the
IFCTL_Abits 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 <[email protected]>Cc Mugunthan V N <[email protected]>Cc Vaibhav Hiremath <[email protected]>Cc David S. Miller <[email protected]>--- drivers/net/ethernet/ti/cpsw.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/ethernet/ti/cpsw.c +0
-0
drivers/net/ethernet/ti/cpsw.c static void _cpsw_adjust_link(struct cpsw_slave · line 393
Quoted 8 lines
drivers/net/ethernet/ti/cpsw.c +3
-0@@ -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 >10Mbps */ +if (phy->speed >10 )
Please change the speed check as == 100 as it is required only for 100Mbps link
Regards
Mugunthan V N
Quoted 7 lines
drivers/net/ethernet/ti/cpsw.c +2
-0+ mac_control |=BIT (15 ); + *link = true;drivers/net/ethernet/ti/cpsw.c +0
-1}else { mac_control =0 ; --1.7.11.4