linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: not calculate new rate for protected clks
@ 2021-05-31 10:39 Peng Fan (OSS)
  2021-07-08  3:01 ` Peng Fan (OSS)
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2021-05-31 10:39 UTC (permalink / raw)
  To: sboyd, mturquette
  Cc: linux-clk, linux-kernel, linux-arm-kernel, kernel, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

If the protect_count of the parent clk is not 0, we not calculate new
rates for parent. Otherwise, the common clk framework may configure
other child clks that is under using.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 65508eb89ec9..8ac121838e13 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2002,7 +2002,7 @@ static struct clk_core *clk_calc_new_rates(struct clk_core *core,
 	}
 
 	if ((core->flags & CLK_SET_RATE_PARENT) && parent &&
-	    best_parent_rate != parent->rate)
+	    best_parent_rate != parent->rate && !clk_core_rate_is_protected(parent))
 		top = clk_calc_new_rates(parent, best_parent_rate);
 
 out:
-- 
2.30.0


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

* RE: [PATCH] clk: not calculate new rate for protected clks
  2021-05-31 10:39 [PATCH] clk: not calculate new rate for protected clks Peng Fan (OSS)
@ 2021-07-08  3:01 ` Peng Fan (OSS)
  0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan (OSS) @ 2021-07-08  3:01 UTC (permalink / raw)
  To: Peng Fan (OSS), sboyd, mturquette
  Cc: linux-clk, linux-kernel, linux-arm-kernel, kernel

> Subject: [PATCH] clk: not calculate new rate for protected clks

Gentle ping...

Thanks,
Peng.

> 
> From: Peng Fan <peng.fan@nxp.com>
> 
> If the protect_count of the parent clk is not 0, we not calculate new rates for
> parent. Otherwise, the common clk framework may configure other child clks
> that is under using.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/clk/clk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index
> 65508eb89ec9..8ac121838e13 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -2002,7 +2002,7 @@ static struct clk_core *clk_calc_new_rates(struct
> clk_core *core,
>  	}
> 
>  	if ((core->flags & CLK_SET_RATE_PARENT) && parent &&
> -	    best_parent_rate != parent->rate)
> +	    best_parent_rate != parent->rate &&
> +!clk_core_rate_is_protected(parent))
>  		top = clk_calc_new_rates(parent, best_parent_rate);
> 
>  out:
> --
> 2.30.0


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

end of thread, other threads:[~2021-07-08  3:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 10:39 [PATCH] clk: not calculate new rate for protected clks Peng Fan (OSS)
2021-07-08  3:01 ` Peng Fan (OSS)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).