]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: phy: marvell-88q2xxx: move interrupt configuration
authorDimitri Fedrau <dima.fedrau@gmail.com>
Sun, 18 Feb 2024 07:57:51 +0000 (08:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 Feb 2024 22:57:00 +0000 (14:57 -0800)
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>
drivers/net/phy/marvell-88q2xxx.c

index 75740f378c66d551cb5d919c58a0436c8ce362a1..6b4bd98833043a3a1bf49024f28747b5bf77c66b 100644 (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);
 }