* [PATCH] netdev: bfin_mac: document TE setting in RMII modes
@ 2011-03-28 7:17 Mike Frysinger
2011-03-28 8:33 ` [PATCH v2] " Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2011-03-28 7:17 UTC (permalink / raw)
To: netdev, David S. Miller; +Cc: uclinux-dist-devel
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>
---
drivers/net/bfin_mac.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 22abfb3..0c68816 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -1237,9 +1237,16 @@ 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;
-#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 */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] netdev: bfin_mac: document TE setting in RMII modes
2011-03-28 7:17 [PATCH] netdev: bfin_mac: document TE setting in RMII modes Mike Frysinger
@ 2011-03-28 8:33 ` Mike Frysinger
2011-03-29 5:27 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2011-03-28 8:33 UTC (permalink / raw)
To: netdev, David S. Miller; +Cc: uclinux-dist-devel
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>
---
v2
- fix thinko -- retain the bf536/bf537 check
drivers/net/bfin_mac.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 22abfb3..68d45ba 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -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
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] netdev: bfin_mac: document TE setting in RMII modes
2011-03-28 8:33 ` [PATCH v2] " Mike Frysinger
@ 2011-03-29 5:27 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-03-29 5:27 UTC (permalink / raw)
To: vapier; +Cc: netdev, uclinux-dist-devel
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 28 Mar 2011 04:33:13 -0400
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-29 5:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 7:17 [PATCH] netdev: bfin_mac: document TE setting in RMII modes Mike Frysinger
2011-03-28 8:33 ` [PATCH v2] " Mike Frysinger
2011-03-29 5:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).