aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/davinci_emac.c
diff options
context:
space:
mode:
authorSriram <srk@ti.com>2010-07-28 22:34:00 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-31 02:55:37 -0400
commite994762f7afef242738b220b48c00a6fd2b165a1 (patch)
tree37daf2b55d03825e1483a0ac55672f8e3e45f090 /drivers/net/davinci_emac.c
parent3725b1fe0b9c7e5ba3c4f6e585cd93a7174c1e07 (diff)
TI DaVinci EMAC: Fix incorrect reference to EMAC_CTRL registers.
The EMAC modules control registers vary as per the version of the EMAC module. EMAC_CTRL_EWCTL,EMAC_CTRL_EWINTTCNT are available only on EMAC_VERSION_1. The emac_dump_regs() function accesses these indiscriminately. This patch fixes the issue. Signed-off-by: Sriramakrishnan <srk@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r--drivers/net/davinci_emac.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 2ebf1a1dd1e1..2fe709f98cc4 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -564,9 +564,11 @@ static void emac_dump_regs(struct emac_priv *priv)
564 564
565 /* Print important registers in EMAC */ 565 /* Print important registers in EMAC */
566 dev_info(emac_dev, "EMAC Basic registers\n"); 566 dev_info(emac_dev, "EMAC Basic registers\n");
567 dev_info(emac_dev, "EMAC: EWCTL: %08X, EWINTTCNT: %08X\n", 567 if (priv->version == EMAC_VERSION_1) {
568 emac_ctrl_read(EMAC_CTRL_EWCTL), 568 dev_info(emac_dev, "EMAC: EWCTL: %08X, EWINTTCNT: %08X\n",
569 emac_ctrl_read(EMAC_CTRL_EWINTTCNT)); 569 emac_ctrl_read(EMAC_CTRL_EWCTL),
570 emac_ctrl_read(EMAC_CTRL_EWINTTCNT));
571 }
570 dev_info(emac_dev, "EMAC: TXID: %08X %s, RXID: %08X %s\n", 572 dev_info(emac_dev, "EMAC: TXID: %08X %s, RXID: %08X %s\n",
571 emac_read(EMAC_TXIDVER), 573 emac_read(EMAC_TXIDVER),
572 ((emac_read(EMAC_TXCONTROL)) ? "enabled" : "disabled"), 574 ((emac_read(EMAC_TXCONTROL)) ? "enabled" : "disabled"),