Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "net: ethernet: stmmac: dwmac-rk: Make the clk_phy could be used for external phy"

This reverts commit da114122b83149d1f1db0586b1d67947b651aa20.

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: da114122b831 ("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>

authored by

Chaoyi Chen and committed by
Jakub Kicinski
a09655dd dc110d1b

+4 -7
+4 -7
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
··· 1410 1410 clk_set_rate(plat->stmmac_clk, 50000000); 1411 1411 } 1412 1412 1413 - if (plat->phy_node) { 1413 + if (plat->phy_node && bsp_priv->integrated_phy) { 1414 1414 bsp_priv->clk_phy = of_clk_get(plat->phy_node, 0); 1415 1415 ret = PTR_ERR_OR_ZERO(bsp_priv->clk_phy); 1416 - /* If it is not integrated_phy, clk_phy is optional */ 1417 - if (bsp_priv->integrated_phy) { 1418 - if (ret) 1419 - return dev_err_probe(dev, ret, "Cannot get PHY clock\n"); 1420 - clk_set_rate(bsp_priv->clk_phy, 50000000); 1421 - } 1416 + if (ret) 1417 + return dev_err_probe(dev, ret, "Cannot get PHY clock\n"); 1418 + clk_set_rate(bsp_priv->clk_phy, 50000000); 1422 1419 } 1423 1420 1424 1421 return 0;