linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] OMAP3 clock: Fix the DPLL freqsel computations
Date: Mon, 16 Nov 2009 06:36:53 -0700	[thread overview]
Message-ID: <20091116133649.14128.89383.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091116133237.14128.39687.stgit@localhost.localdomain>

From: Rajendra Nayak <rnayak@ti.com>

Fix the freqsel value computation. Use n instead of (n+1)

The formula in the TRM uses a zero-based N, hence the (n+1); however
at this point in the clock34xx.c code, N is one-based.

Hayati Bayrakdar <h-bayrakdar@ti.com> and Nishanth Menon <nm@ti.com> helped
track down this bug.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
[paul at pwsan.com: modified commit message]
Cc: Hayati Bayrakdar <h-bayrakdar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/clock34xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index c258f87..225c1a7 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -473,7 +473,7 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n)
 	unsigned long fint;
 	u16 f = 0;
 
-	fint = clk->dpll_data->clk_ref->rate / (n + 1);
+	fint = clk->dpll_data->clk_ref->rate / n;
 
 	pr_debug("clock: fint is %lu\n", fint);
 

  reply	other threads:[~2009-11-16 13:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 13:36 [PATCH 0/3] OMAP clock and PM architecture fixes for 2.6.32-rc6 Paul Walmsley
2009-11-16 13:36 ` Paul Walmsley [this message]
2009-11-16 13:36 ` [PATCH 2/3] OMAP3: Clock: Fixed dpll3_m2x2 rate calculation Paul Walmsley
2009-11-16 13:36 ` [PATCH 3/3] OMAP clock/hwmod: fix off-by-one errors Paul Walmsley
2009-11-16 14:08   ` Russell King - ARM Linux
2009-11-17 17:39     ` Paul Walmsley
2009-11-17 17:50       ` Pandita, Vikram
2009-11-17 22:24         ` Tony Lindgren
2009-11-18 18:47           ` Tony Lindgren
2009-11-18 19:11             ` 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=20091116133649.14128.89383.stgit@localhost.localdomain \
    --to=paul@pwsan.com \
    --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 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).