summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParthiban Veerasooran <parthiban.veerasooran@microchip.com>2024-10-10 13:52:02 +0530
committerJakub Kicinski <kuba@kernel.org>2024-10-11 15:54:39 -0700
commit117b70e4c67ba6fa64492b8fcda0826fc3928def (patch)
tree85dbc22ebfbb89814441abc212760d0df05cef38
parent7a0414fdccf303dc306d621a710e4c5e67388075 (diff)
net: phy: microchip_t1s: move LAN867X reset handling to a new function
Move LAN867X reset handling code to a new function called lan867x_check_reset_complete() which will be useful for the next patch which also uses the same code to handle the reset functionality. Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com> Link: https://patch.msgid.link/20241010082205.221493-5-parthiban.veerasooran@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/phy/microchip_t1s.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1s.c
index b21f5acb4468..d9814a09a026 100644
--- a/drivers/net/phy/microchip_t1s.c
+++ b/drivers/net/phy/microchip_t1s.c
@@ -266,7 +266,7 @@ static int lan865x_revb_config_init(struct phy_device *phydev)
return 0;
}
-static int lan867x_revb1_config_init(struct phy_device *phydev)
+static int lan867x_check_reset_complete(struct phy_device *phydev)
{
int err;
@@ -288,6 +288,17 @@ static int lan867x_revb1_config_init(struct phy_device *phydev)
}
}
+ return 0;
+}
+
+static int lan867x_revb1_config_init(struct phy_device *phydev)
+{
+ int err;
+
+ err = lan867x_check_reset_complete(phydev);
+ if (err)
+ return err;
+
/* Reference to AN1699
* https://ww1.microchip.com/downloads/aemDocuments/documents/AIS/ProductDocuments/SupportingCollateral/AN-LAN8670-1-2-config-60001699.pdf
* AN1699 says Read, Modify, Write, but the Write is not required if the