clk: renesas: rzg2l: Fix FOUTPOSTDIV clk
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines
From: [email protected] <[email protected]> On Behalf Of Lad Prabhakar via lists.cip-project.org
Sent: 11 December 2024 18:15
To: [email protected]; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>
Cc: Biju Das <[email protected]>
Subject: [cip-dev] [PATCH 5.10.y-cip] clk: renesas: rzg2l: Fix FOUTPOSTDIV clkFrom: Biju Das <[email protected]>
commit
dabf72b85f298970e86891b5218459c17b57b26aupstream.While computing
foutpostdiv_rate, the value ofparams->pl5_fracinis discarded, which results in the wrong refresh rate. Fix the formula for computingfoutpostdiv_rate.Fixes 1561380ee72f ("clk: renesas: rzg2l: Add FOUTPOSTDIV clk support")Signed-off-by Hien Huynh <[email protected]>Signed-off-by Biju Das <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Quoted 7 lines
Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Lad Prabhakar <[email protected]>--- drivers/clk/renesas/rzg2l-cpg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Gentle ping for review.
Cheers,
Prabhakar
Quoted 34 lines
drivers/clk/renesas/rzg2l- renamed from drivers/clk/renesas/rzg2l-cpg.c +0
-0
cpg.cindexb1952d2ee8c2..379292eb6fb1100644drivers/clk/renesas/rzg2l-cpg.c +1
-1@@ -556,7 +556,7 @@ static unsigned long rzg2l_cpg_get_foutpostdiv_rate(struct rzg2l_pll5_param *params, unsigned long rate) { -unsigned long foutpostdiv_rate; +unsigned long foutpostdiv_rate, foutvco_rate; params->pl5_intin = rate /MEGA ; params->pl5_fracin = div_u64(((u64)rate % MEGA) << 24, MEGA); @@ -565,10 +565,11 @@ rzg2l_cpg_get_foutpostdiv_rate(struct
rzg2l_pll5_param*params,drivers/clk/renesas/rzg2l-cpg.c +2
-4params->pl5_postdiv2 =1 ; params->pl5_spread =0x16 ; - foutpostdiv_rate = -EXTAL_FREQ_IN_MEGA_HZ *MEGA / params->pl5_refdiv * - ((((params->pl5_intin <<24 ) + params->pl5_fracin)) >>24 ) / - (params->pl5_postdiv1 * params->pl5_postdiv2); + foutvco_rate = div_u64(mul_u32_u32(EXTAL_FREQ_IN_MEGA_HZ * MEGA, + (params->pl5_intin << 24) + params-Quoted 1 line
pl5_fracin),drivers/clk/renesas/rzg2l-cpg.c +3
-0+ params->pl5_refdiv) >> 24; + foutpostdiv_rate = DIV_ROUND_CLOSEST_ULL(foutvco_rate, + params->pl5_postdiv1 * params-Quoted 1 line
pl5_postdiv2);return
foutpostdiv_rate;
}
--
2.43.0
Hi!
Quoted 16 lines
Quoted 9 lines
While computing
foutpostdiv_rate, the value ofparams->pl5_fracinis discarded, which results in the wrong refresh rate. Fix the formula for computingfoutpostdiv_rate.Fixes 1561380ee72f ("clk: renesas: rzg2l: Add FOUTPOSTDIV clk support")Signed-off-by Hien Huynh <[email protected]>Signed-off-by Biju Das <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Quoted 7 lines
Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Lad Prabhakar <[email protected]>--- drivers/clk/renesas/rzg2l-cpg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Quoted 1 line
Gentle ping for review.
Again, sorry for the delay. Should we have similar patch for 6.1? I can't seem to find that in my mailbox...
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Hi all,
Quoted 30 lines
-----Original Message-----
From: Pavel Machek <[email protected]>
Sent: Thursday, December 19, 2024 12:53 AM
To: Prabhakar Mahadev Lad <[email protected]>
Cc: [email protected]; iwamatsu nobuhiro(岩松 信洋 ○DITC□ DIT○OST) <[email protected]>; Pavel Machek <[email protected]>; Biju Das <[email protected]>
Subject: Re: [cip-dev] [PATCH 5.10.y-cip] clk: renesas: rzg2l: Fix FOUTPOSTDIV clkHi!
Quoted 18 lines
Quoted 18 lines
While computing
foutpostdiv_rate, the value ofparams->pl5_fracinis discarded, which results in the wrong refresh rate. Fix the formula for computingfoutpostdiv_rate.Fixes 1561380ee72f ("clk: renesas: rzg2l: Add FOUTPOSTDIV clksupport")
Signed-off-by Hien Huynh <[email protected]>Signed-off-by Biju Das <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Lad Prabhakar--- drivers/clk/renesas/rzg2l-cpg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Quoted 5 lines
Quoted 1 line
Gentle ping for review.
Again, sorry for the delay. Should we have similar patch for 6.1? I can't seem to find that in my mailbox...
I could not find it either from mailbox and patchwork. Perhaps a patch for 6.1.y-cip has not been posted.
Prabhakar, If we need this patch to 6.1.y-cip, could you send it ?
Best regards,
Nobuhiro
Hi Pavel,
Quoted 29 lines
From: Pavel Machek <[email protected]>
Sent: 18 December 2024 15:53
To: Prabhakar Mahadev Lad <[email protected]>
Cc: [email protected]; Nobuhiro Iwamatsu <[email protected]>; Pavel Machek <[email protected]>; Biju Das <[email protected]>
Subject: Re: [cip-dev] [PATCH 5.10.y-cip] clk: renesas: rzg2l: Fix FOUTPOSTDIV clkHi!
Quoted 18 lines
Quoted 18 lines
While computing
foutpostdiv_rate, the value ofparams->pl5_fracinis discarded, which results in the wrong refresh rate. Fix the formula for computingfoutpostdiv_rate.Fixes 1561380ee72f ("clk: renesas: rzg2l: Add FOUTPOSTDIV clksupport")
Signed-off-by Hien Huynh <[email protected]>Signed-off-by Biju Das <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>Signed-off-by Geert Uytterhoeven <[email protected]>Signed-off-by Lad Prabhakar--- drivers/clk/renesas/rzg2l-cpg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Quoted 5 lines
Quoted 1 line
Gentle ping for review.
Again, sorry for the delay. Should we have similar patch for 6.1? I can't seem to find that in my mailbox...
Thank you for the review. For 6.1 this patch should automatically land into CIP via stable due to fixes tag.
Cheers,
Prabhakar
Hi!
Quoted 5 lines
Quoted 3 lines
Again, sorry for the delay. Should we have similar patch for 6.1? I can't seem to find that in my mailbox...
Thank you for the review. For 6.1 this patch should automatically land into CIP via stable due to fixes tag.
Ok, thanks for the info. Unless it is urgent, I believe it will be better to wait for patch to land to 6.1 before merging 5.10 versions, in future.
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany