Skip to content

Commit

Permalink
clk: vt8500: Fix error in PLL calculations on non-exact match.
Browse files Browse the repository at this point in the history
When a PLL frequency calculation is performed and a non-exact match
is found the wrong multiplier and divisors are returned.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
  • Loading branch information
Tony Prisk authored and Mike Turquette committed Jan 16, 2013
1 parent 3fe296c commit 35a5db5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/clk/clk-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ static void wm8650_find_pll_bits(unsigned long rate, unsigned long parent_rate,
/* if we got here, it wasn't an exact match */
pr_warn("%s: requested rate %lu, found rate %lu\n", __func__, rate,
rate - best_err);
*multiplier = mul;
*divisor1 = div1;
*divisor2 = div2;
*multiplier = best_mul;
*divisor1 = best_div1;
*divisor2 = best_div2;
}

static int vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate,
Expand Down

0 comments on commit 35a5db5

Please sign in to comment.