All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
@ 2015-01-24  8:42 Chen-Yu Tsai
  2015-01-24 15:29 ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2015-01-24  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
Cc: <stable@vger.kernel.org> # 3.12
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

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(+)

diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 24c7cc12e9e1..699458e0f9b2 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -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 = {
-- 
2.1.4

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-24  8:42 [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result Chen-Yu Tsai
@ 2015-01-24 15:29 ` Maxime Ripard
  2015-01-28  1:41   ` Mike Turquette
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2015-01-24 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
> 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
> Cc: <stable@vger.kernel.org> # 3.12
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Could you queue this for 3.19?

Thanks,
Maxime

-- 
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>

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-24 15:29 ` Maxime Ripard
@ 2015-01-28  1:41   ` Mike Turquette
  2015-01-28  6:19     ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Turquette @ 2015-01-28  1:41 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Maxime Ripard (2015-01-24 07:29:44)
> Hi Mike,
> 
> On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
> > 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
> > Cc: <stable@vger.kernel.org> # 3.12
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> 
> 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

> 
> Thanks,
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-28  1:41   ` Mike Turquette
@ 2015-01-28  6:19     ` Chen-Yu Tsai
  2015-01-28 18:01       ` Mike Turquette
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2015-01-28  6:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 28, 2015 at 2:41 AM, Mike Turquette <mturquette@linaro.org> wrote:
> Quoting Maxime Ripard (2015-01-24 07:29:44)
>> Hi Mike,
>>
>> On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
>> > 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
>> > Cc: <stable@vger.kernel.org> # 3.12
>> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>>
>> 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.

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

>>
>> Thanks,
>> Maxime
>>
>> --
>> Maxime Ripard, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-28  6:19     ` Chen-Yu Tsai
@ 2015-01-28 18:01       ` Mike Turquette
  2015-01-28 21:57         ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Turquette @ 2015-01-28 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
> On Wed, Jan 28, 2015 at 2:41 AM, Mike Turquette <mturquette@linaro.org> wrote:
> > Quoting Maxime Ripard (2015-01-24 07:29:44)
> >> Hi Mike,
> >>
> >> On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
> >> > 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
> >> > Cc: <stable@vger.kernel.org> # 3.12
> >> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >>
> >> 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.
> 
> 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

> 
> ChenYu
> 
> >>
> >> Thanks,
> >> Maxime
> >>
> >> --
> >> Maxime Ripard, Free Electrons
> >> Embedded Linux, Kernel and Android engineering
> >> http://free-electrons.com

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-28 18:01       ` Mike Turquette
@ 2015-01-28 21:57         ` Chen-Yu Tsai
  2015-01-29  2:31           ` Mike Turquette
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2015-01-28 21:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 28, 2015 at 7:01 PM, Mike Turquette <mturquette@linaro.org> wrote:
> Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
>> On Wed, Jan 28, 2015 at 2:41 AM, Mike Turquette <mturquette@linaro.org> wrote:
>> > Quoting Maxime Ripard (2015-01-24 07:29:44)
>> >> Hi Mike,
>> >>
>> >> On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
>> >> > 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
>> >> > Cc: <stable@vger.kernel.org> # 3.12
>> >> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> >>
>> >> 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.
>>
>> 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.

AFAIK the stable-commit doc explains the format above as cherry-picking
9a5e6c7eb5cc first, then applying this patch.

> 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

> Regards,
> Mike
>
>>
>> ChenYu
>>
>> >>
>> >> Thanks,
>> >> Maxime
>> >>
>> >> --
>> >> Maxime Ripard, Free Electrons
>> >> Embedded Linux, Kernel and Android engineering
>> >> http://free-electrons.com

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

* [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
  2015-01-28 21:57         ` Chen-Yu Tsai
@ 2015-01-29  2:31           ` Mike Turquette
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Turquette @ 2015-01-29  2:31 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Chen-Yu Tsai (2015-01-28 13:57:14)
> On Wed, Jan 28, 2015 at 7:01 PM, Mike Turquette <mturquette@linaro.org> wrote:
> > Quoting Chen-Yu Tsai (2015-01-27 22:19:22)
> >> On Wed, Jan 28, 2015 at 2:41 AM, Mike Turquette <mturquette@linaro.org> wrote:
> >> > Quoting Maxime Ripard (2015-01-24 07:29:44)
> >> >> Hi Mike,
> >> >>
> >> >> On Sat, Jan 24, 2015 at 04:42:39PM +0800, Chen-Yu Tsai wrote:
> >> >> > 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: <stable@vger.kernel.org> # 3.12 9a5e6c7eb5cc clk: sunxi: Support factor
> >> >> > Cc: <stable@vger.kernel.org> # 3.12
> >> >> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> >>
> >> >> 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.
> >>
> >> 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.
> 
> AFAIK the stable-commit doc explains the format above as cherry-picking
> 9a5e6c7eb5cc first, then applying this patch.

I just learned something new. I didn't know about the cherry-picking
format. That's cool.

> 
> > 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

> 
> ChenYu
> 
> > Regards,
> > Mike
> >
> >>
> >> ChenYu
> >>
> >> >>
> >> >> Thanks,
> >> >> Maxime
> >> >>
> >> >> --
> >> >> Maxime Ripard, Free Electrons
> >> >> Embedded Linux, Kernel and Android engineering
> >> >> http://free-electrons.com

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

end of thread, other threads:[~2015-01-29  2:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24  8:42 [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result Chen-Yu Tsai
2015-01-24 15:29 ` Maxime Ripard
2015-01-28  1:41   ` Mike Turquette
2015-01-28  6:19     ` Chen-Yu Tsai
2015-01-28 18:01       ` Mike Turquette
2015-01-28 21:57         ` Chen-Yu Tsai
2015-01-29  2:31           ` Mike Turquette

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.