summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Karlman <jonas@kwiboo.se>2024-11-09 21:04:10 +0000
committerTom Rini <trini@konsulko.com>2025-01-10 18:56:09 -0600
commitc63eae2817195f4b315c8b19a0055e10ca062e84 (patch)
tree32ad0cad064665672b794ed19fe561e950dc3063
parent2247b8aa20b117b1df3a7be295771c5ac3a7fb6e (diff)
rockchip: clk: rk3288: Drop use of SCLK_MAC_PLL
The SCLK_MAC_PLL id is not exported or referenced upstream. It is also not referenced in vendor U-Boot or vendor kernel 4.4, 4.19, 5.10 or 6.1. Relax the check for parent id SCLK_MAC_PLL when using internal clock source for gmac to allow use of clock/rk3288-cru.h from dts/upstream. All in-tree and upstream rk3288 DTs use an external clock as parent, so no functional change to boards is expected with this change. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--drivers/clk/rockchip/clk_rk3288.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 43c44fadbe7..a4ff1c41abb 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -903,11 +903,11 @@ static int __maybe_unused rk3288_gmac_set_parent(struct clk *clk, struct clk *pa
int ret;
/*
- * If the requested parent is in the same clock-controller and
- * the id is SCLK_MAC_PLL ("mac_pll_src"), switch to the internal
- * clock.
+ * If the requested parent is in the same clock-controller the
+ * likely parent is the unexported SCLK_MAC_PLL ("mac_pll_src"),
+ * switch to the internal clock.
*/
- if ((parent->dev == clk->dev) && (parent->id == SCLK_MAC_PLL)) {
+ if (parent->dev == clk->dev) {
debug("%s: switching GAMC to SCLK_MAC_PLL\n", __func__);
rk_clrsetreg(&cru->cru_clksel_con[21], RMII_EXTCLK_MASK, 0);
return 0;