Skip to content

Commit

Permalink
omap3: clock: Fix the DPLL freqsel computations
Browse files Browse the repository at this point in the history
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@pwsan.com: modified commit message]
Cc: Hayati Bayrakdar <h-bayrakdar@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Rajendra Nayak authored and Tony Lindgren committed Nov 17, 2009
1 parent f7343de commit 9346f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/clock34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9346f48

Please sign in to comment.