Commit f29207d2 authored by Dimitri Fedrau's avatar Dimitri Fedrau Committed by Jakub Kicinski

net: phy: marvell-88q2xxx: move interrupt configuration

Move interrupt configuration from mv88q222x_revb0_config_init to
mv88q2xxx_config_init. Same register and bits are used for the 88q2xxx
devices.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarStefan Eichenberger <eichest@gmail.com>
Signed-off-by: default avatarDimitri Fedrau <dima.fedrau@gmail.com>
Link: https://lore.kernel.org/r/20240218075753.18067-15-dima.fedrau@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 923d3104
......@@ -376,6 +376,14 @@ static int mv88q2xxx_config_init(struct phy_device *phydev)
*/
phydev->pma_extable = MDIO_PMA_EXTABLE_BT1;
/* Configure interrupt with default settings, output is driven low for
* active interrupt and high for inactive.
*/
if (phy_interrupt_is_valid(phydev))
return phy_set_bits_mmd(phydev, MDIO_MMD_PCS,
MDIO_MMD_PCS_MV_GPIO_INT_CTRL,
MDIO_MMD_PCS_MV_GPIO_INT_CTRL_TRI_DIS);
return 0;
}
......@@ -701,14 +709,6 @@ static int mv88q222x_revb0_config_init(struct phy_device *phydev)
return ret;
}
/* Configure interrupt with default settings, output is driven low for
* active interrupt and high for inactive.
*/
if (phy_interrupt_is_valid(phydev))
return phy_set_bits_mmd(phydev, MDIO_MMD_PCS,
MDIO_MMD_PCS_MV_GPIO_INT_CTRL,
MDIO_MMD_PCS_MV_GPIO_INT_CTRL_TRI_DIS);
return mv88q2xxx_config_init(phydev);
}
......
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