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: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Stefan Eichenberger <eichest@gmail.com>
Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
Link: https://lore.kernel.org/r/20240218075753.18067-15-dima.fedrau@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Dimitri Fedrau 2024-02-18 08:57:51 +01:00 committed by Jakub Kicinski
parent 923d3104f7
commit f29207d2e0

View File

@ -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);
}