summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2026-02-23 12:34:46 +0300
committerJakub Kicinski <kuba@kernel.org>2026-02-25 04:43:22 +0300
commitb560938163db801d5ba27fa55a1aa68ccaf1ef2e (patch)
tree8b99eec3ff074202608fb85f54a76c0cd22d176d /drivers
parentcd0aa651535092afd5d776bfe94e4fdf750f89c3 (diff)
downloadlinux-b560938163db801d5ba27fa55a1aa68ccaf1ef2e.tar.xz
net: stmmac: qcom-ethqos: pass phy interface mode to configs
Pass the current phylink phy interface mode to the RGMII and "SGMII" configuration functions. Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vuSL0-0000000AScM-2TN0@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 9b29516a5a7c..e2dd334ffd31 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -100,7 +100,8 @@ struct ethqos_emac_driver_data {
struct qcom_ethqos {
struct platform_device *pdev;
void __iomem *rgmii_base;
- void (*configure_func)(struct qcom_ethqos *ethqos, int speed);
+ void (*configure_func)(struct qcom_ethqos *ethqos,
+ phy_interface_t interface, int speed);
unsigned int link_clk_rate;
struct clk *link_clk;
@@ -521,7 +522,8 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
return 0;
}
-static void ethqos_configure_rgmii(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure_rgmii(struct qcom_ethqos *ethqos,
+ phy_interface_t interface, int speed)
{
struct device *dev = &ethqos->pdev->dev;
unsigned int i;
@@ -605,7 +607,8 @@ static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable)
/* On interface toggle MAC registers gets reset.
* Configure MAC block for SGMII on ethernet phy link up
*/
-static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos,
+ phy_interface_t interface, int speed)
{
struct net_device *dev = platform_get_drvdata(ethqos->pdev);
struct stmmac_priv *priv = netdev_priv(dev);
@@ -638,9 +641,10 @@ static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos, int speed)
}
}
-static void ethqos_configure(struct qcom_ethqos *ethqos, int speed)
+static void ethqos_configure(struct qcom_ethqos *ethqos,
+ phy_interface_t interface, int speed)
{
- return ethqos->configure_func(ethqos, speed);
+ return ethqos->configure_func(ethqos, interface, speed);
}
static void ethqos_fix_mac_speed(void *priv, phy_interface_t interface,
@@ -649,7 +653,7 @@ static void ethqos_fix_mac_speed(void *priv, phy_interface_t interface,
struct qcom_ethqos *ethqos = priv;
ethqos_update_link_clk(ethqos, speed);
- ethqos_configure(ethqos, speed);
+ ethqos_configure(ethqos, interface, speed);
}
static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv)