Commit 26311cd1 authored by Sarosh Hasan's avatar Sarosh Hasan Committed by David S. Miller

net: stmmac: dwmac-qcom-ethqos: Update link clock rate only for RGMII

Updating link clock rate for different speeds is only needed when
using RGMII, as that mode requires changing clock speed when the link
speed changes. Let's restrict updating the link clock speed in
ethqos_update_link_clk() to just RGMII. Other modes such as SGMII
only need to enable the link clock (which is already done in probe).
Signed-off-by: default avatarSarosh Hasan <quic_sarohasa@quicinc.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride
Reviewed-by: default avatarAbhishek Chauhan <quic_abchauha@quicinc.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cfb9eb61
......@@ -170,6 +170,9 @@ static void rgmii_dump(void *priv)
static void
ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed)
{
if (!phy_interface_mode_is_rgmii(ethqos->phy_mode))
return;
switch (speed) {
case SPEED_1000:
ethqos->link_clk_rate = RGMII_1000_NOM_CLK_FREQ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment