Skip to content

Commit

Permalink
netdev: bfin_mac: document TE setting in RMII modes
Browse files Browse the repository at this point in the history
The current code sometimes generates build warnings due to how it checks
the silicon revision, so clean it up and properly document things.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mike Frysinger authored and David S. Miller committed Mar 29, 2011
1 parent bc8d7da commit 72f4905
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions drivers/net/bfin_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,17 @@ static int bfin_mac_enable(struct phy_device *phydev)

if (phydev->interface == PHY_INTERFACE_MODE_RMII) {
opmode |= RMII; /* For Now only 100MBit are supported */
#if (defined(CONFIG_BF537) || defined(CONFIG_BF536)) && CONFIG_BF_REV_0_2
opmode |= TE;
#if defined(CONFIG_BF537) || defined(CONFIG_BF536)
if (__SILICON_REVISION__ < 3) {
/*
* This isn't publicly documented (fun times!), but in
* silicon <=0.2, the RX and TX pins are clocked together.
* So in order to recv, we must enable the transmit side
* as well. This will cause a spurious TX interrupt too,
* but we can easily consume that.
*/
opmode |= TE;
}
#endif
}

Expand Down

0 comments on commit 72f4905

Please sign in to comment.