clk: mmp: fix the wrong calculation formula
authorChao Xie <chao.xie@marvell.com>
Thu, 23 Jan 2014 02:47:41 +0000 (10:47 +0800)
committerMike Turquette <mturquette@linaro.org>
Thu, 27 Mar 2014 03:59:27 +0000 (20:59 -0700)
commitc45693a6480cee906557a9fba533a9f3c224f91e
tree1f1566bfffe25d0de323f87c3d50e1bef3de8f20
parent7433ab43fa17094173f18a39f33c3a24d50b300f
clk: mmp: fix the wrong calculation formula

The formula is numerator/denominator = Fin / (Fout * factor)
So
Fout = Fin * denominator / (numerator * factor).
Current clk_factor_round_rate and clk_factor_recalc_rate use
wrong formula. This patch will fix them.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/mmp/clk-frac.c