Commit aa22437e authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

chelsio: Use generic XENPAK LASI register definitions

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Acked-by: default avatarDivy Le Ray <divy@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f29f6de
...@@ -86,7 +86,8 @@ static int mv88x201x_reset(struct cphy *cphy, int wait) ...@@ -86,7 +86,8 @@ static int mv88x201x_reset(struct cphy *cphy, int wait)
static int mv88x201x_interrupt_enable(struct cphy *cphy) static int mv88x201x_interrupt_enable(struct cphy *cphy)
{ {
/* Enable PHY LASI interrupts. */ /* Enable PHY LASI interrupts. */
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, 0x9002, 0x1); cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL,
MDIO_PMA_LASI_LSALARM);
/* Enable Marvell interrupts through Elmer0. */ /* Enable Marvell interrupts through Elmer0. */
if (t1_is_asic(cphy->adapter)) { if (t1_is_asic(cphy->adapter)) {
...@@ -102,7 +103,7 @@ static int mv88x201x_interrupt_enable(struct cphy *cphy) ...@@ -102,7 +103,7 @@ static int mv88x201x_interrupt_enable(struct cphy *cphy)
static int mv88x201x_interrupt_disable(struct cphy *cphy) static int mv88x201x_interrupt_disable(struct cphy *cphy)
{ {
/* Disable PHY LASI interrupts. */ /* Disable PHY LASI interrupts. */
cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, 0x9002, 0x0); cphy_mdio_write(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_CTRL, 0x0);
/* Disable Marvell interrupts through Elmer0. */ /* Disable Marvell interrupts through Elmer0. */
if (t1_is_asic(cphy->adapter)) { if (t1_is_asic(cphy->adapter)) {
...@@ -122,9 +123,9 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy) ...@@ -122,9 +123,9 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy)
#ifdef MV88x2010_LINK_STATUS_BUGS #ifdef MV88x2010_LINK_STATUS_BUGS
/* Required to read twice before clear takes affect. */ /* Required to read twice before clear takes affect. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9003, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_RXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9004, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_TXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9005, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT, &val);
/* Read this register after the others above it else /* Read this register after the others above it else
* the register doesn't clear correctly. * the register doesn't clear correctly.
...@@ -135,12 +136,12 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy) ...@@ -135,12 +136,12 @@ static int mv88x201x_interrupt_clear(struct cphy *cphy)
/* Clear link status. */ /* Clear link status. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val);
/* Clear PHY LASI interrupts. */ /* Clear PHY LASI interrupts. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9005, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_STAT, &val);
#ifdef MV88x2010_LINK_STATUS_BUGS #ifdef MV88x2010_LINK_STATUS_BUGS
/* Do it again. */ /* Do it again. */
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9003, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_RXSTAT, &val);
cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, 0x9004, &val); cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_PMA_LASI_TXSTAT, &val);
#endif #endif
/* Clear Marvell interrupts through Elmer0. */ /* Clear Marvell interrupts through Elmer0. */
......
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