[PATCH 3/4] net: phy: marvell 88e151x: Allow board-level override of
Timothy Pearson
tpearson at raptorengineering.com
Sat Mar 22 03:30:22 AEDT 2025
LED configuration
Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
---
drivers/net/phy/marvell.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 345d3a65104..896e67c8043 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -412,12 +412,8 @@ static int m88e1518_config(struct phy_device *phydev)
}
/* Marvell 88E1510 */
-static int m88e1510_config(struct phy_device *phydev)
+int __weak m88e1510_led_config(struct phy_device *phydev)
{
- /* Select page 3 */
- phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1118_PHY_PAGE,
- MIIM_88E1118_PHY_LED_PAGE);
-
/* Enable INTn output on LED[2] */
m88e1518_phy_writebits(phydev, MIIM_88E151x_LED_TIMER_CTRL,
MIIM_88E151x_INT_EN_OFFS, 1, 1);
@@ -432,9 +428,26 @@ static int m88e1510_config(struct phy_device *phydev)
MIIM_88E151x_LED1_OFFS, MIIM_88E151x_LED_FLD_SZ,
MIIM_88E151x_LED1_100_1000_LINK);
+ return 0;
+}
+
+static int m88e1510_config(struct phy_device *phydev)
+{
+ int ret;
+
+ /* Select page 3 */
+ phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1118_PHY_PAGE,
+ MIIM_88E1118_PHY_LED_PAGE);
+
+ /* Configure LEDs */
+ ret = m88e1510_led_config(phydev);
+
/* Reset page selection */
phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1118_PHY_PAGE, 0);
+ if (ret)
+ return ret;
+
return m88e1518_config(phydev);
}
--
2.39.5
More information about the openbmc
mailing list