Skip to content

Commit 342b7b7

Browse files
zonquedavem330
authored andcommitted
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 <[email protected]> Cc: Mugunthan V N <[email protected]> Cc: Vaibhav Hiremath <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8112ec3 commit 342b7b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/ti/cpsw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,11 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
386386
mac_control |= BIT(7); /* GIGABITEN */
387387
if (phy->duplex)
388388
mac_control |= BIT(0); /* FULLDUPLEXEN */
389+
390+
/* set speed_in input in case RMII mode is used in 100Mbps */
391+
if (phy->speed == 100)
392+
mac_control |= BIT(15);
393+
389394
*link = true;
390395
} else {
391396
mac_control = 0;

0 commit comments

Comments
 (0)