* [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks [not found] <CGME20240510065909eucas1p20067042a45b26e0a58110ff439dcc1b8@eucas1p2.samsung.com> @ 2024-05-10 6:59 ` Marek Szyprowski 2024-05-14 21:12 ` Stephen Boyd 2024-07-18 12:20 ` Artur Weber 0 siblings, 2 replies; 5+ messages in thread From: Marek Szyprowski @ 2024-05-10 6:59 UTC (permalink / raw) To: linux-samsung-soc, linux-clk Cc: Marek Szyprowski, Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd, Sam Protsenko Commit 4d11c62ca8d7 ("clkdev: report over-sized strings when creating clkdev entries") revealed that clock lookup is registered for all fixed clocks. The mentioned commit added a check if the registered name is not too long. This fails for some clocks registered for Exynos542x SoCs family. This lookup is a left-over from early common clock framework days, not really needed nowadays, so remove it to avoid further issues. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Tested-by: Sam Protsenko <semen.protsenko@linaro.org> --- v2: - removed unused 'ret' variable --- drivers/clk/samsung/clk.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c index b6701905f254..afa5760ed3a1 100644 --- a/drivers/clk/samsung/clk.c +++ b/drivers/clk/samsung/clk.c @@ -139,7 +139,7 @@ void __init samsung_clk_register_fixed_rate(struct samsung_clk_provider *ctx, unsigned int nr_clk) { struct clk_hw *clk_hw; - unsigned int idx, ret; + unsigned int idx; for (idx = 0; idx < nr_clk; idx++, list++) { clk_hw = clk_hw_register_fixed_rate(ctx->dev, list->name, @@ -151,15 +151,6 @@ void __init samsung_clk_register_fixed_rate(struct samsung_clk_provider *ctx, } samsung_clk_add_lookup(ctx, clk_hw, list->id); - - /* - * Unconditionally add a clock lookup for the fixed rate clocks. - * There are not many of these on any of Samsung platforms. - */ - ret = clk_hw_register_clkdev(clk_hw, list->name, NULL); - if (ret) - pr_err("%s: failed to register clock lookup for %s", - __func__, list->name); } } -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks 2024-05-10 6:59 ` [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks Marek Szyprowski @ 2024-05-14 21:12 ` Stephen Boyd 2024-07-18 12:20 ` Artur Weber 1 sibling, 0 replies; 5+ messages in thread From: Stephen Boyd @ 2024-05-14 21:12 UTC (permalink / raw) To: Marek Szyprowski, linux-clk, linux-samsung-soc Cc: Marek Szyprowski, Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette, Sam Protsenko Quoting Marek Szyprowski (2024-05-09 23:59:01) > Commit 4d11c62ca8d7 ("clkdev: report over-sized strings when creating > clkdev entries") revealed that clock lookup is registered for all fixed > clocks. The mentioned commit added a check if the registered name is not > too long. This fails for some clocks registered for Exynos542x SoCs family. > This lookup is a left-over from early common clock framework days, not > really needed nowadays, so remove it to avoid further issues. > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> > Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> > Tested-by: Sam Protsenko <semen.protsenko@linaro.org> > --- Applied to clk-next ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks 2024-05-10 6:59 ` [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks Marek Szyprowski 2024-05-14 21:12 ` Stephen Boyd @ 2024-07-18 12:20 ` Artur Weber 2024-07-22 6:26 ` Krzysztof Kozlowski 1 sibling, 1 reply; 5+ messages in thread From: Artur Weber @ 2024-07-18 12:20 UTC (permalink / raw) To: Marek Szyprowski, linux-samsung-soc, linux-clk Cc: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd, Sam Protsenko On 10.05.2024 08:59, Marek Szyprowski wrote: > Commit 4d11c62ca8d7 ("clkdev: report over-sized strings when creating > clkdev entries") revealed that clock lookup is registered for all fixed > clocks. The mentioned commit added a check if the registered name is not > too long. This fails for some clocks registered for Exynos542x SoCs family. > This lookup is a left-over from early common clock framework days, not > really needed nowadays, so remove it to avoid further issues. This commit causes a warning to appear during startup on Exynos 4x12: > [ 0.000000] exynos4_clk_register_finpll: failed to lookup parent clock xusbxti, assuming fin_pll clock frequency is 24MHz > [ 0.000000] Exynos4x12 clocks: sclk_apll = 400000000, sclk_mpll = 800000000 > sclk_epll = 96000000, sclk_vpll = 108000000, arm_clk = 800000000 The warning seems to come from exynos4_clk_register_finpll in drivers/clk/samsung/clk-exynos4.c, where clk_get fails with error code -2. Best regards Artur ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks 2024-07-18 12:20 ` Artur Weber @ 2024-07-22 6:26 ` Krzysztof Kozlowski 2024-07-22 6:34 ` Krzysztof Kozlowski 0 siblings, 1 reply; 5+ messages in thread From: Krzysztof Kozlowski @ 2024-07-22 6:26 UTC (permalink / raw) To: Artur Weber, Marek Szyprowski, linux-samsung-soc, linux-clk Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd, Sam Protsenko On 18/07/2024 14:20, Artur Weber wrote: > On 10.05.2024 08:59, Marek Szyprowski wrote: >> Commit 4d11c62ca8d7 ("clkdev: report over-sized strings when creating >> clkdev entries") revealed that clock lookup is registered for all fixed >> clocks. The mentioned commit added a check if the registered name is not >> too long. This fails for some clocks registered for Exynos542x SoCs family. >> This lookup is a left-over from early common clock framework days, not >> really needed nowadays, so remove it to avoid further issues. > > This commit causes a warning to appear during startup on Exynos 4x12:> > > [ 0.000000] exynos4_clk_register_finpll: failed to lookup parent clock xusbxti, assuming fin_pll clock frequency is 24MHz > > [ 0.000000] Exynos4x12 clocks: sclk_apll = 400000000, sclk_mpll = 800000000 > > sclk_epll = 96000000, sclk_vpll = 108000000, arm_clk = 800000000 > > The warning seems to come from exynos4_clk_register_finpll in > drivers/clk/samsung/clk-exynos4.c, where clk_get fails with error code -2. Indeed, so clk_hw_register_clkdev() was needed for clk_get(). I have a fix for this. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks 2024-07-22 6:26 ` Krzysztof Kozlowski @ 2024-07-22 6:34 ` Krzysztof Kozlowski 0 siblings, 0 replies; 5+ messages in thread From: Krzysztof Kozlowski @ 2024-07-22 6:34 UTC (permalink / raw) To: Artur Weber, Marek Szyprowski, linux-samsung-soc, linux-clk Cc: Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd, Sam Protsenko On 22/07/2024 08:26, Krzysztof Kozlowski wrote: > On 18/07/2024 14:20, Artur Weber wrote: >> On 10.05.2024 08:59, Marek Szyprowski wrote: >>> Commit 4d11c62ca8d7 ("clkdev: report over-sized strings when creating >>> clkdev entries") revealed that clock lookup is registered for all fixed >>> clocks. The mentioned commit added a check if the registered name is not >>> too long. This fails for some clocks registered for Exynos542x SoCs family. >>> This lookup is a left-over from early common clock framework days, not >>> really needed nowadays, so remove it to avoid further issues. >> >> This commit causes a warning to appear during startup on Exynos 4x12:> >> > [ 0.000000] exynos4_clk_register_finpll: failed to lookup parent clock xusbxti, assuming fin_pll clock frequency is 24MHz >> > [ 0.000000] Exynos4x12 clocks: sclk_apll = 400000000, sclk_mpll = 800000000 >> > sclk_epll = 96000000, sclk_vpll = 108000000, arm_clk = 800000000 >> >> The warning seems to come from exynos4_clk_register_finpll in >> drivers/clk/samsung/clk-exynos4.c, where clk_get fails with error code -2. > > > Indeed, so clk_hw_register_clkdev() was needed for clk_get(). I have a > fix for this. ... and of course thanks for the report! Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-22 6:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240510065909eucas1p20067042a45b26e0a58110ff439dcc1b8@eucas1p2.samsung.com>
2024-05-10 6:59 ` [PATCH v2] clk: samsung: Don't register clkdev lookup for the fixed rate clocks Marek Szyprowski
2024-05-14 21:12 ` Stephen Boyd
2024-07-18 12:20 ` Artur Weber
2024-07-22 6:26 ` Krzysztof Kozlowski
2024-07-22 6:34 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox