Commit e994762f authored by Sriram's avatar Sriram Committed by David S. Miller

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: default avatarSriramakrishnan <srk@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3725b1fe
......@@ -564,9 +564,11 @@ static void emac_dump_regs(struct emac_priv *priv)
/* Print important registers in EMAC */
dev_info(emac_dev, "EMAC Basic registers\n");
dev_info(emac_dev, "EMAC: EWCTL: %08X, EWINTTCNT: %08X\n",
emac_ctrl_read(EMAC_CTRL_EWCTL),
emac_ctrl_read(EMAC_CTRL_EWINTTCNT));
if (priv->version == EMAC_VERSION_1) {
dev_info(emac_dev, "EMAC: EWCTL: %08X, EWINTTCNT: %08X\n",
emac_ctrl_read(EMAC_CTRL_EWCTL),
emac_ctrl_read(EMAC_CTRL_EWINTTCNT));
}
dev_info(emac_dev, "EMAC: TXID: %08X %s, RXID: %08X %s\n",
emac_read(EMAC_TXIDVER),
((emac_read(EMAC_TXCONTROL)) ? "enabled" : "disabled"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment