LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: balbi@ti.com
Cc: paul@pwsan.com, tony@atomide.com, r-woodruff2@ti.com,
	linux-kernel@vger.kernel.org,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH v2] omap2: fix DPLL_FREQSEL calculation
Date: Thu, 20 Jan 2011 15:29:50 +0100	[thread overview]
Message-ID: <8739on1wdd.fsf_-_@vostro.fn.ogness.net> (raw)
In-Reply-To: <20110120111645.GB2223@legolas.emea.dhcp.ti.com> (Felipe Balbi's message of "Thu\, 20 Jan 2011 13\:16\:45 +0200")

On 2011-01-20, Felipe Balbi <balbi@ti.com> wrote:
> scripts/get_maintainer.pl would've helped you getting a better Cc
> list. I'm adding linux-omap and lakml

Thanks.

After investigating the issue further it seems that I had it
backwards. The value of "n" is the value to divide by, not the value
that goes in the register. This means that it is _dpll_test_fint()
that is doing it incorrectly. Here is a new version of the patch to
fix the right function.



This patch fixes the calculation of the internal frequency. The value
of "n" is the actual divider to use.

This patch is against linux-next-20110120.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
 arch/arm/mach-omap2/clkt_dpll.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c
index 337392c..acb7ae5 100644
--- a/arch/arm/mach-omap2/clkt_dpll.c
+++ b/arch/arm/mach-omap2/clkt_dpll.c
@@ -77,7 +77,7 @@ static int _dpll_test_fint(struct clk *clk, u8 n)
 	dd = clk->dpll_data;
 
 	/* DPLL divider must result in a valid jitter correction val */
-	fint = clk->parent->rate / (n + 1);
+	fint = clk->parent->rate / n;
 	if (fint < DPLL_FINT_BAND1_MIN) {
 
 		pr_debug("rejecting n=%d due to Fint failure, "

  reply	other threads:[~2011-01-20 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 10:42 [PATCH] " John Ogness
2011-01-20 11:16 ` Felipe Balbi
2011-01-20 14:29   ` John Ogness [this message]
2011-01-21  3:15     ` [PATCH v2] " Felipe Balbi
2011-01-21  8:33       ` [PATCH v3] OMAP2/3: clock: fix fint calculation for DPLL_FREQSEL John Ogness
2011-02-08  3:09         ` Paul Walmsley

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=8739on1wdd.fsf_-_@vostro.fn.ogness.net \
    --to=john.ogness@linutronix.de \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=r-woodruff2@ti.com \
    --cc=tony@atomide.com \
    --subject='Re: [PATCH v2] omap2: fix DPLL_FREQSEL calculation' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).