On 13.06.2023 13:15, Marek Szyprowski wrote:
> On 05.05.2023 13:25, Maxime Ripard wrote:
>> From: Stephen Boyd <[email protected]>
>>
>> We'll need to turn the code in clk_mux_determine_rate_flags() to deal
>> with CLK_SET_RATE_NO_REPARENT into a helper clock drivers will be able
>> to use if they don't want to allow reparenting.
>>
>> Cc: Abel Vesa <[email protected]>
>> Cc: Alessandro Zummo <[email protected]>
>> Cc: Alexandre Belloni <[email protected]>
>> Cc: Alexandre Torgue <[email protected]>
>> Cc: "Andreas Färber" <[email protected]>
>> Cc: AngeloGioacchino Del Regno <[email protected]>
>> Cc: Baolin Wang <[email protected]>
>> Cc: Charles Keepax <[email protected]>
>> Cc: Chen-Yu Tsai <[email protected]>
>> Cc: Chen-Yu Tsai <[email protected]>
>> Cc: Chunyan Zhang <[email protected]>
>> Cc: Claudiu Beznea <[email protected]>
>> Cc: Daniel Vetter <[email protected]>
>> Cc: David Airlie <[email protected]>
>> Cc: David Lechner <[email protected]>
>> Cc: Dinh Nguyen <[email protected]>
>> Cc: Fabio Estevam <[email protected]>
>> Cc: Geert Uytterhoeven <[email protected]>
>> Cc: Jaroslav Kysela <[email protected]>
>> Cc: Jernej Skrabec <[email protected]>
>> Cc: Jonathan Hunter <[email protected]>
>> Cc: Kishon Vijay Abraham I <[email protected]>
>> Cc: Liam Girdwood <[email protected]>
>> Cc: Linus Walleij <[email protected]>
>> Cc: Luca Ceresoli <[email protected]>
>> Cc: Manivannan Sadhasivam <[email protected]>
>> Cc: Mark Brown <[email protected]>
>> Cc: Markus Schneider-Pargmann <[email protected]>
>> Cc: Max Filippov <[email protected]>
>> Cc: Maxime Coquelin <[email protected]>
>> Cc: Mikko Perttunen <[email protected]>
>> Cc: Miles Chen <[email protected]>
>> Cc: Nicolas Ferre <[email protected]>
>> Cc: Orson Zhai <[email protected]>
>> Cc: Paul Cercueil <[email protected]>
>> Cc: Peng Fan <[email protected]>
>> Cc: Peter De Schrijver <[email protected]>
>> Cc: Prashant Gaikwad <[email protected]>
>> Cc: Richard Fitzgerald <[email protected]>
>> Cc: Samuel Holland <[email protected]>
>> Cc: Sascha Hauer <[email protected]>
>> Cc: Sekhar Nori <[email protected]>
>> Cc: Shawn Guo <[email protected]>
>> Cc: Takashi Iwai <[email protected]>
>> Cc: Thierry Reding <[email protected]>
>> Cc: Ulf Hansson <[email protected]>
>> Cc: Vinod Koul <[email protected]>
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: NXP Linux Team <[email protected]>
>> Cc: [email protected]
>> Cc: Pengutronix Kernel Team <[email protected]>
>> Signed-off-by: Stephen Boyd <[email protected]>
>> Signed-off-by: Maxime Ripard <[email protected]>
>> ---
>
> This patch landed in today's linux-next as commit 1b4e99fda73f ("clk: 
> Move no reparent case into a separate function"). Unfortunately it 
> causes serious regression of some of my test boards. Namely Exynos3250 
> based boards are so slow after it, that my test scripts fail with a 
> timeout waiting for them to finish booting. I will try to debug this 
> later in the evening to check what has happened that some clocks got 
> very low rate.
>
I just got a few spare minutes, so I decided to take a look into this 
issue. The following change fixed my problem:

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ffc9f03840b7..7ac9f7a8cb84 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -629,6 +629,7 @@ clk_core_determine_rate_no_reparent(struct clk_hw *hw,
                 best = clk_core_get_rate_nolock(core);
         }

+       req->best_parent_rate = best;
         req->rate = best;

         return 0;

best_parent_rate is still being used somewhere in the code and needs to 
be updated regardless of the CLK_SET_RATE_NO_REPARENT flag.

 > ...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Reply via email to