From: Brent Cook <bcook@bpointsys.com>
To: netdev@vger.kernel.org
Subject: [PATCH 3/3] mv643xx fixes - Support BCM5461 PHY initialization
Date: Tue, 27 Jun 2006 09:52:11 -0500 [thread overview]
Message-ID: <200606270952.11163.bcook@bpointsys.com> (raw)
A couple of PrPMC MV64x60 boards have Broadcom BCM5461 PHYs rather than
Marvell. This patch adds the initialization bits required by these PHYs.
There was infrastructure prior to the 2.6.16 kernel for the ppc platform
support to add extra flags to the ethernet ports during initialization but
driver simplifaction removed this ability, so I just put the required
TX_CLK_DELAY flag in the main driver instead. This does not appear to have
any affect on the Marvell PHY-based board that I tested it on.
Signed-off-by: Brent Cook <bcook@bpointsys.com>
--- a/drivers/net/mv643xx_eth.c 2006-05-04 00:51:47.000000000 -0500
+++ b/drivers/net/mv643xx_eth.c 2006-06-27 09:20:58.000000000 -0500
@@ -1788,6 +1795,7 @@
MV643XX_ETH_DISABLE_AUTO_NEG_SPEED_GMII |
MV643XX_ETH_DISABLE_AUTO_NEG_FOR_DUPLX |
MV643XX_ETH_DO_NOT_FORCE_LINK_FAIL |
+ MV643XX_ETH_TX_CLK_DELAY |
MV643XX_ETH_SERIAL_PORT_CONTROL_RESERVED;
mv_write(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(port_num), pscr);
@@ -2275,6 +2283,7 @@
static void ethernet_phy_reset(unsigned int eth_port_num)
{
unsigned int phy_reg_data;
+ unsigned int id1, id2;
/* Reset the PHY */
eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
@@ -2286,6 +2295,14 @@
udelay(1);
eth_port_read_smi_reg(eth_port_num, 0, &phy_reg_data);
} while (phy_reg_data & 0x8000);
+
+ /* Check PHY type */
+ eth_port_read_smi_reg(eth_port_num, 0x02, &id1);
+ eth_port_read_smi_reg(eth_port_num, 0x03, &id2);
+ if ((id1 == 0x0020) && ((id2 & 0xfff0) == 0x60c0)) {
+ /* BCM5461 fixup: Disable GTXC delay */
+ eth_port_write_smi_reg(eth_port_num, 0x1c, 0x8c00);
+ }
}
static void mv643xx_eth_port_enable_tx(unsigned int port_num,
reply other threads:[~2006-06-27 14:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200606270952.11163.bcook@bpointsys.com \
--to=bcook@bpointsys.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).