diff options
author | Dimitri Fedrau <dima.fedrau@gmail.com> | 2024-02-18 08:57:51 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-21 14:57:00 -0800 |
commit | f29207d2e0fae525cece3ece038ca5ca90bf8990 (patch) | |
tree | 7799bfd3b12d4d539fe0f6f262515827d09a6fbf /drivers/net/phy | |
parent | 923d3104f7945dc29c1740d038d4868a791a4d32 (diff) |
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>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/marvell-88q2xxx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/phy/marvell-88q2xxx.c b/drivers/net/phy/marvell-88q2xxx.c index 75740f378c66..6b4bd9883304 100644 --- a/drivers/net/phy/marvell-88q2xxx.c +++ b/drivers/net/phy/marvell-88q2xxx.c @@ -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); } |