From: Daniel Mack <zonque@gmail.com>
To: netdev@vger.kernel.org
Cc: Daniel Mack <zonque@gmail.com>,
Mugunthan V N <mugunthanvnm@ti.com>,
Vaibhav Hiremath <hvaibhav@ti.com>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH v2] net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL
Date: Thu, 27 Sep 2012 21:19:34 +0200 [thread overview]
Message-ID: <1348773574-30318-1-git-send-email-zonque@gmail.com> (raw)
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 <zonque@gmail.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/ti/cpsw.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index aa78168..fb1a692 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -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 100Mbps */
+ if (phy->speed == 100)
+ mac_control |= BIT(15);
+
*link = true;
} else {
mac_control = 0;
--
1.7.11.4
next reply other threads:[~2012-09-27 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 19:19 Daniel Mack [this message]
2012-10-01 9:25 ` [PATCH v2] net: ti cpsw ethernet: set IFCTL_A bit in MACCONTROL Daniel Mack
2012-10-01 10:52 ` N, Mugunthan V
2012-10-01 21:09 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348773574-30318-1-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=davem@davemloft.net \
--cc=hvaibhav@ti.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).