clk: ti: Fix FAPLL recalc_rate for rounding errors
authorTony Lindgren <tony@atomide.com>
Sun, 22 Mar 2015 22:35:24 +0000 (15:35 -0700)
committerTero Kristo <t-kristo@ti.com>
Tue, 24 Mar 2015 18:26:05 +0000 (20:26 +0200)
commit33ca29c99e8680b4c921c6eafb9fc1603c5b9779
tree7bcae4571d8ff8a3f6859b5dcda71ff6907e5afc
parent712f7d64f079872d2895743f4b718bc0fdff725c
clk: ti: Fix FAPLL recalc_rate for rounding errors

We need to round the calculated value to have it match the requested rate.

While at it, let's fix a typo and use a define for SYNTH_MAX_DIV_M as we
will need it in later patches for set_rate.

And let's remove two unused includes.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: Matthijs van Duin <matthijsvanduin@gmail.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
drivers/clk/ti/fapll.c