Revert "net: ethernet: stmmac: dwmac-rk: Make the clk_phy could be used for external phy"
This reverts commitpull/1354/mergeda114122b8. As discussed, the PHY clock should be managed by PHY driver instead of other driver like dwmac-rk. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/a30a8c97-6b96-45ba-bad7-8a40401babc2@samsung.com Fixes:da114122b8("net: ethernet: stmmac: dwmac-rk: Make the clk_phy could be used for external phy") Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com> Link: https://patch.msgid.link/0A3F1D1604FEE424+20250916012628.1819-1-kernel@airkyi.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
parent
dc110d1b23
commit
a09655dde7
|
|
@ -1410,16 +1410,13 @@ static int rk_gmac_clk_init(struct plat_stmmacenet_data *plat)
|
||||||
clk_set_rate(plat->stmmac_clk, 50000000);
|
clk_set_rate(plat->stmmac_clk, 50000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plat->phy_node) {
|
if (plat->phy_node && bsp_priv->integrated_phy) {
|
||||||
bsp_priv->clk_phy = of_clk_get(plat->phy_node, 0);
|
bsp_priv->clk_phy = of_clk_get(plat->phy_node, 0);
|
||||||
ret = PTR_ERR_OR_ZERO(bsp_priv->clk_phy);
|
ret = PTR_ERR_OR_ZERO(bsp_priv->clk_phy);
|
||||||
/* If it is not integrated_phy, clk_phy is optional */
|
|
||||||
if (bsp_priv->integrated_phy) {
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return dev_err_probe(dev, ret, "Cannot get PHY clock\n");
|
return dev_err_probe(dev, ret, "Cannot get PHY clock\n");
|
||||||
clk_set_rate(bsp_priv->clk_phy, 50000000);
|
clk_set_rate(bsp_priv->clk_phy, 50000000);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue