All of lore.kernel.org
 help / color / mirror / Atom feed
From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result
Date: Sat, 24 Jan 2015 16:42:39 +0800	[thread overview]
Message-ID: <1422088959-23365-1-git-send-email-wens@csie.org> (raw)

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

             reply	other threads:[~2015-01-24  8:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-24  8:42 Chen-Yu Tsai [this message]
2015-01-24 15:29 ` [PATCH v2] clk: sunxi: fix sun6i PLL1 .recalc_rate() result 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422088959-23365-1-git-send-email-wens@csie.org \
    --to=wens@csie.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.