summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/dpll3xxx.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2014-07-29 04:03:30 -0700
committerTony Lindgren <tony@atomide.com>2014-07-29 04:03:30 -0700
commitd40dbcd57b942528d7dbd17ace0b32136d848ecb (patch)
tree2a37983629948ff3086ad1d13d6d1612afa8478a /arch/arm/mach-omap2/dpll3xxx.c
parent3965f5ba0489c01f419216c8909965b9a6a39388 (diff)
parent0a26344440b5f9940c99112fdc3804f073b1f5a7 (diff)
downloadlinux-d40dbcd57b942528d7dbd17ace0b32136d848ecb.tar.bz2
Merge tag 'for-v3.17/omap-clock-b' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.17/soc
Modify OMAP PLL rate rounding function to round to the exact rate requested or the next one below it. This is intended to resolve some DSS problems. Basic build, boot, and PM test results are available here: http://www.pwsan.com/omap/testlogs/clock-b-v3.17/20140725061121/
Diffstat (limited to 'arch/arm/mach-omap2/dpll3xxx.c')
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index cd5f3a0b97bd..ac3d789ac3cd 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -475,6 +475,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
{
struct clk_hw_omap *clk = to_clk_hw_omap(hw);
struct clk *new_parent = NULL;
+ unsigned long rrate;
u16 freqsel = 0;
struct dpll_data *dd;
int ret;
@@ -502,8 +503,16 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
__clk_prepare(dd->clk_ref);
clk_enable(dd->clk_ref);
- if (dd->last_rounded_rate != rate)
- rate = __clk_round_rate(hw->clk, rate);
+ /* XXX this check is probably pointless in the CCF context */
+ if (dd->last_rounded_rate != rate) {
+ rrate = __clk_round_rate(hw->clk, rate);
+ if (rrate != rate) {
+ pr_warn("%s: %s: final rate %lu does not match desired rate %lu\n",
+ __func__, __clk_get_name(hw->clk),
+ rrate, rate);
+ rate = rrate;
+ }
+ }
if (dd->last_rounded_rate == 0)
return -EINVAL;