Title: [9798] trunk/drivers/net/bfin_mac.c: [#6509] netdev: bfin_mac: document TE setting in RMII modes
Revision
9798
Author
vapier
Date
2011-03-28 04:15:37 -0400 (Mon, 28 Mar 2011)

Log Message

[#6509] netdev: bfin_mac: document TE setting in RMII modes

The current code sometimes generates build warnings due to how it checks
the silicon revision, so clean it up and properly document things.

Modified Paths

Diff

Modified: trunk/drivers/net/bfin_mac.c (9797 => 9798)


--- trunk/drivers/net/bfin_mac.c	2011-03-28 07:59:52 UTC (rev 9797)
+++ trunk/drivers/net/bfin_mac.c	2011-03-28 08:15:37 UTC (rev 9798)
@@ -1237,9 +1237,16 @@
 
 	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;
-#endif
+		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;
+		}
 	}
 
 	/* Turn on the EMAC rx */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to