clk: sunxi: fix sun6i PLL1 .recalc_rate() result
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so clk_factors_recalc_rate() gives the correct result.
---
Somehow I remember doing this during the A23 bring-up, but never sent it, and the patch was lost.
Changes in v2:
Added better commit message.
--- drivers/clk/sunxi/clk-sunxi.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/sunxi/clk-sunxi.c +1 -0
@@ -584,6 +584,7 @@ static struct clk_factors_config sun6i_a31_pll1_config = { .kwidth = 2, .mshift = 0, .mwidth = 2, + .n_start = 1, };static struct clk_factors_config sun8i_a23_pll1_config = {
Signature · 1 line
2.1.4
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Hi Mike,
Quoted 7 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>
Could you queue this for 3.19?
Thanks,
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150124/30267c02/attachment.sig>
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Quoting Maxime Ripard (2015-01-24 07:29:44)
Quoted 7 lines
Hi Mike,
Quoted 4 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.
Quoted 5 lines
Quoted 3 lines
Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>Could you queue this for 3.19?
This is fixed in 76820fc in clk-next, destined for 3.20.
Also I'm confused by the stable tags above. Looks like 9a5e6c7eb5cc was merged for 3.16, not 3.12.
Regards,
Mike
Quoted 8 lines
Thanks,
MaximeSignature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Quoted 12 lines · Mike Turquette
Quoting Maxime Ripard (2015-01-24 07:29:44)
Quoted 11 lines
Hi Mike,
Quoted 7 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>
Quoted 6 lines
Quoted 1 line
Could you queue this for 3.19?
This is fixed in 76820fc in clk-next, destined for 3.20.
Also I'm confused by the stable tags above. Looks like
9a5e6c7eb5ccwas merged for 3.16, not 3.12.
I think so. I wasn't quite sure what the version number was supposed to be, the first version it is applicable? or the first version the specific patch was merged.
ChenYu
Quoted 8 lines
Quoted 8 lines
Thanks,
Maxime--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
Quoted 15 lines · Mike Turquette
Quoted 14 lines
Quoting Maxime Ripard (2015-01-24 07:29:44)
Quoted 12 lines
Hi Mike,
Quoted 7 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>Could you queue this for 3.19?
Quoted 8 lines
Quoted 4 lines
This is fixed in 76820fc in clk-next, destined for 3.20.
Also I'm confused by the stable tags above. Looks like
9a5e6c7eb5ccwas merged for 3.16, not 3.12.I think so. I wasn't quite sure what the version number was supposed to be, the first version it is applicable? or the first version the specific patch was merged.
Chen-Yu,
I think that struct clk_factors_config did not have the n_start member before 9a5e6c7eb5cc, so this patch could not apply without 9a5e6c7eb5cc. That's from memory though, and I might be mis-remembering.
The fix is not for a new regression, thus it is going into 3.20 and I am remiss to rebase my tree to add a stable tag. Can you submit this to stable yourself after 3.20-rc1? I think the proper thing to do is to reference this patch and the commitlog to show that it was fixed upstream.
Regards,
Mike
Quoted 11 lines
ChenYu
Quoted 8 lines
Quoted 8 lines
Thanks,
Maxime--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Quoted 25 lines · Mike Turquette
Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
Quoted 15 lines · Mike Turquette
Quoted 14 lines
Quoting Maxime Ripard (2015-01-24 07:29:44)
Quoted 12 lines
Hi Mike,
Quoted 7 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>Could you queue this for 3.19?
Quoted 8 lines
Quoted 4 lines
This is fixed in 76820fc in clk-next, destined for 3.20.
Also I'm confused by the stable tags above. Looks like
9a5e6c7eb5ccwas merged for 3.16, not 3.12.I think so. I wasn't quite sure what the version number was supposed to be, the first version it is applicable? or the first version the specific patch was merged.
Quoted 5 lines
Chen-Yu,
I think that struct
clk_factors_configdid not have then_startmember before9a5e6c7eb5cc, so this patch could not apply without9a5e6c7eb5cc. That's from memory though, and I might be mis-remembering.
AFAIK the stable-commit doc explains the format above as cherry-picking 9a5e6c7eb5cc first, then applying this patch.
Quoted 5 lines
The fix is not for a new regression, thus it is going into 3.20 and I am remiss to rebase my tree to add a stable tag. Can you submit this to stable yourself after 3.20-rc1? I think the proper thing to do is to reference this patch and the commitlog to show that it was fixed upstream.
Sure. Also CC-ing Hans, as his name is on the patch for 3.20. :)
ChenYu
Quoted 14 lines
Regards,
MikeQuoted 11 lines
ChenYu
Quoted 8 lines
Quoted 8 lines
Thanks,
Maxime--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
PATCH v2 1/1 clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Quoting Chen-Yu Tsai (2015-01-28 13:57:14)
Quoted 26 lines · Mike Turquette
Quoted 25 lines
Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
Quoted 23 lines · Mike Turquette
Quoted 12 lines
Quoting Maxime Ripard (2015-01-24 07:29:44)
Quoted 11 lines
Hi Mike,
Quoted 7 lines · Chen-Yu Tsai
PLL1 on sun6i has its N factor start from 1 (N = register value + 1). Make the factors clk driver aware of this so
clk_factors_recalc_rate()gives the correct result.Cc <[email protected]> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factorCc <[email protected]> # 3.12Signed-off-by Chen-Yu Tsai <[email protected]>Quoted 6 lines
Quoted 1 line
Could you queue this for 3.19?
This is fixed in 76820fc in clk-next, destined for 3.20.
Also I'm confused by the stable tags above. Looks like
9a5e6c7eb5ccwas merged for 3.16, not 3.12.I think so. I wasn't quite sure what the version number was supposed to be, the first version it is applicable? or the first version the specific patch was merged.
Quoted 8 lines
Quoted 5 lines
Chen-Yu,
I think that struct
clk_factors_configdid not have then_startmember before9a5e6c7eb5cc, so this patch could not apply without9a5e6c7eb5cc. That's from memory though, and I might be mis-remembering.AFAIK the stable-commit doc explains the format above as cherry-picking
9a5e6c7eb5ccfirst, then applying this patch.
I just learned something new. I didn't know about the cherry-picking format. That's cool.
Quoted 8 lines
Quoted 6 lines
The fix is not for a new regression, thus it is going into 3.20 and I am remiss to rebase my tree to add a stable tag. Can you submit this to stable yourself after 3.20-rc1? I think the proper thing to do is to reference this patch and the commitlog to show that it was fixed upstream.
Sure. Also CC-ing Hans, as his name is on the patch for 3.20. :)
Thanks!
Regards,
Mike
Quoted 17 lines
ChenYu
Quoted 14 lines
Regards,
MikeQuoted 11 lines
ChenYu
Quoted 8 lines
Quoted 8 lines
Thanks,
Maxime--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com