lkml.org 
[lkml]   [2023]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 11/11] clk: sunxi-ng: nkm: Prefer current parent rate
Date
Dne nedelja, 06. avgust 2023 ob 15:06:56 CEST je Frank Oltmanns napisal(a):
> Similar to ccu_mp, if the current parent rate allows getting the ideal
> rate, prefer to not change the parent clock's rate.
>
> Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
> drivers/clk/sunxi-ng/ccu_nkm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c
> index 896bb1ef8642..1e49444817cf 100644
> --- a/drivers/clk/sunxi-ng/ccu_nkm.c
> +++ b/drivers/clk/sunxi-ng/ccu_nkm.c
> @@ -35,7 +35,8 @@ static unsigned long
> ccu_nkm_find_best_with_parent_adj(struct ccu_common *common
>
> tmp_rate = tmp_parent * _n * _k /
_m;
>
> - if (ccu_is_better_rate(common,
rate, tmp_rate, best_rate)) {
> + if (ccu_is_better_rate(common,
rate, tmp_rate, best_rate) ||
> + (tmp_parent == *parent &&
tmp_rate == best_rate)) {
> best_rate = tmp_rate;
> best_parent_rate =
tmp_parent;
> best_n = _n;




\
 
 \ /
  Last update: 2023-08-06 15:44    [W:0.079 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site