Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical
       [not found] <CGME20200805091612eucas1p28c955b21e57898de60d3ed50c95b9d18@eucas1p2.samsung.com>
@ 2020-08-05  9:16 ` Marek Szyprowski
  2020-08-05 10:39   ` Lukasz Luba
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marek Szyprowski @ 2020-08-05  9:16 UTC (permalink / raw)
  To: linux-clk, linux-pm, linux-samsung-soc
  Cc: Marek Szyprowski, Sylwester Nawrocki, Chanwoo Choi,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Stephen Boyd

BPLL clock must not be disabled because it is needed for proper DRAM
operation. This is normally handled by respective memory devfreq driver,
but when that driver is not yet probed or its probe has been deferred the
clock might got disabled what causes board hang. Fix this by marking it
as critical.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/clk/samsung/clk-exynos5420.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index fea33399a632..5ef78928938a 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -734,7 +734,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
 	MUX_F(CLK_MOUT_MCLK_CDREX, "mout_mclk_cdrex", mout_mclk_cdrex_p,
 			SRC_CDREX, 4, 1, CLK_SET_RATE_PARENT, 0),
 	MUX_F(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_CDREX, 0, 1,
-			CLK_SET_RATE_PARENT, 0),
+			CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0),
 
 	/* MAU Block */
 	MUX(CLK_MOUT_MAUDIO0, "mout_maudio0", mout_maudio0_p, SRC_MAU, 28, 3),
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical
  2020-08-05  9:16 ` [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical Marek Szyprowski
@ 2020-08-05 10:39   ` Lukasz Luba
  2020-08-05 10:57   ` Krzysztof Kozlowski
  2020-08-06  2:49   ` Chanwoo Choi
  2 siblings, 0 replies; 5+ messages in thread
From: Lukasz Luba @ 2020-08-05 10:39 UTC (permalink / raw)
  To: Marek Szyprowski, linux-clk, linux-pm, linux-samsung-soc
  Cc: Sylwester Nawrocki, Chanwoo Choi, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Stephen Boyd

Hi Marek,

On 8/5/20 10:16 AM, Marek Szyprowski wrote:
> BPLL clock must not be disabled because it is needed for proper DRAM
> operation. This is normally handled by respective memory devfreq driver,
> but when that driver is not yet probed or its probe has been deferred the
> clock might got disabled what causes board hang. Fix this by marking it
> as critical.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>   drivers/clk/samsung/clk-exynos5420.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index fea33399a632..5ef78928938a 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -734,7 +734,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
>   	MUX_F(CLK_MOUT_MCLK_CDREX, "mout_mclk_cdrex", mout_mclk_cdrex_p,
>   			SRC_CDREX, 4, 1, CLK_SET_RATE_PARENT, 0),
>   	MUX_F(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_CDREX, 0, 1,
> -			CLK_SET_RATE_PARENT, 0),
> +			CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0),
>   
>   	/* MAU Block */
>   	MUX(CLK_MOUT_MAUDIO0, "mout_maudio0", mout_maudio0_p, SRC_MAU, 28, 3),
> 

I've tested it in the way that we discussed yesterday.
I can confirm this patch solves the issue.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>

Thank you for investigating this further and fixing it.

Regards,
Lukasz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical
  2020-08-05  9:16 ` [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical Marek Szyprowski
  2020-08-05 10:39   ` Lukasz Luba
@ 2020-08-05 10:57   ` Krzysztof Kozlowski
  2020-08-06  2:49   ` Chanwoo Choi
  2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-05 10:57 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-clk, linux-pm, linux-samsung-soc, Sylwester Nawrocki,
	Chanwoo Choi, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Stephen Boyd

On Wed, Aug 05, 2020 at 11:16:01AM +0200, Marek Szyprowski wrote:
> BPLL clock must not be disabled because it is needed for proper DRAM
> operation. This is normally handled by respective memory devfreq driver,
> but when that driver is not yet probed or its probe has been deferred the
> clock might got disabled what causes board hang. Fix this by marking it
> as critical.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5420.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical
  2020-08-05  9:16 ` [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical Marek Szyprowski
  2020-08-05 10:39   ` Lukasz Luba
  2020-08-05 10:57   ` Krzysztof Kozlowski
@ 2020-08-06  2:49   ` Chanwoo Choi
  2020-08-07 13:24     ` Sylwester Nawrocki
  2 siblings, 1 reply; 5+ messages in thread
From: Chanwoo Choi @ 2020-08-06  2:49 UTC (permalink / raw)
  To: Marek Szyprowski, linux-clk, linux-pm, linux-samsung-soc
  Cc: Sylwester Nawrocki, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Lukasz Luba, Stephen Boyd

Hi Marek,

On 8/5/20 6:16 PM, Marek Szyprowski wrote:
> BPLL clock must not be disabled because it is needed for proper DRAM
> operation. This is normally handled by respective memory devfreq driver,
> but when that driver is not yet probed or its probe has been deferred the
> clock might got disabled what causes board hang. Fix this by marking it
> as critical.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5420.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index fea33399a632..5ef78928938a 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -734,7 +734,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
>  	MUX_F(CLK_MOUT_MCLK_CDREX, "mout_mclk_cdrex", mout_mclk_cdrex_p,
>  			SRC_CDREX, 4, 1, CLK_SET_RATE_PARENT, 0),
>  	MUX_F(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_CDREX, 0, 1,
> -			CLK_SET_RATE_PARENT, 0),
> +			CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0),
>  
>  	/* MAU Block */
>  	MUX(CLK_MOUT_MAUDIO0, "mout_maudio0", mout_maudio0_p, SRC_MAU, 28, 3),
> 

Thanks for your fix. Looks good to me.
Just I have one comment. I looks like the similar case of patch[1] related to G3D clock.
[1] commit 67f96ff7c8f0 ("clk: samsung: exynos5420: Keep top G3D clocks enabled")

How about fixing this issue with same style[1]?
Or are there any reason about should you do it with CLK_IS_CRITICAL?

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical
  2020-08-06  2:49   ` Chanwoo Choi
@ 2020-08-07 13:24     ` Sylwester Nawrocki
  0 siblings, 0 replies; 5+ messages in thread
From: Sylwester Nawrocki @ 2020-08-07 13:24 UTC (permalink / raw)
  To: Chanwoo Choi, Marek Szyprowski
  Cc: linux-clk, linux-pm, linux-samsung-soc, Sylwester Nawrocki,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Lukasz Luba,
	Stephen Boyd

Hi,

On 8/6/20 04:49, Chanwoo Choi wrote:
> On 8/5/20 6:16 PM, Marek Szyprowski wrote:
>> BPLL clock must not be disabled because it is needed for proper DRAM
>> operation. This is normally handled by respective memory devfreq driver,
>> but when that driver is not yet probed or its probe has been deferred the
>> clock might got disabled what causes board hang. Fix this by marking it
>> as critical.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>  drivers/clk/samsung/clk-exynos5420.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
>> index fea33399a632..5ef78928938a 100644
>> --- a/drivers/clk/samsung/clk-exynos5420.c
>> +++ b/drivers/clk/samsung/clk-exynos5420.c
>> @@ -734,7 +734,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = {
>>  	MUX_F(CLK_MOUT_MCLK_CDREX, "mout_mclk_cdrex", mout_mclk_cdrex_p,
>>  			SRC_CDREX, 4, 1, CLK_SET_RATE_PARENT, 0),
>>  	MUX_F(CLK_MOUT_BPLL, "mout_bpll", mout_bpll_p, SRC_CDREX, 0, 1,
>> -			CLK_SET_RATE_PARENT, 0),
>> +			CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0),
>>  
>>  	/* MAU Block */
>>  	MUX(CLK_MOUT_MAUDIO0, "mout_maudio0", mout_maudio0_p, SRC_MAU, 28, 3),
>>
> Thanks for your fix. Looks good to me.
> Just I have one comment. I looks like the similar case of patch[1] related to G3D clock.
> [1] commit 67f96ff7c8f0 ("clk: samsung: exynos5420: Keep top G3D clocks enabled")
> 
> How about fixing this issue with same style[1]?

Yes, I think it would be better to make it the same way as it was done with 
the G3D clock.

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-07 13:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20200805091612eucas1p28c955b21e57898de60d3ed50c95b9d18@eucas1p2.samsung.com>
2020-08-05  9:16 ` [PATCH] clk: samsung: Mark top BPLL mux on Exynos542x as critical Marek Szyprowski
2020-08-05 10:39   ` Lukasz Luba
2020-08-05 10:57   ` Krzysztof Kozlowski
2020-08-06  2:49   ` Chanwoo Choi
2020-08-07 13:24     ` Sylwester Nawrocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox