diff options
Diffstat (limited to 'arch/arm/mach-omap2/dpll3xxx.c')
-rw-r--r-- | arch/arm/mach-omap2/dpll3xxx.c | 13 |
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, | |||
475 | { | 475 | { |
476 | struct clk_hw_omap *clk = to_clk_hw_omap(hw); | 476 | struct clk_hw_omap *clk = to_clk_hw_omap(hw); |
477 | struct clk *new_parent = NULL; | 477 | struct clk *new_parent = NULL; |
478 | unsigned long rrate; | ||
478 | u16 freqsel = 0; | 479 | u16 freqsel = 0; |
479 | struct dpll_data *dd; | 480 | struct dpll_data *dd; |
480 | int ret; | 481 | int ret; |
@@ -502,8 +503,16 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, | |||
502 | __clk_prepare(dd->clk_ref); | 503 | __clk_prepare(dd->clk_ref); |
503 | clk_enable(dd->clk_ref); | 504 | clk_enable(dd->clk_ref); |
504 | 505 | ||
505 | if (dd->last_rounded_rate != rate) | 506 | /* XXX this check is probably pointless in the CCF context */ |
506 | rate = __clk_round_rate(hw->clk, rate); | 507 | if (dd->last_rounded_rate != rate) { |
508 | rrate = __clk_round_rate(hw->clk, rate); | ||
509 | if (rrate != rate) { | ||
510 | pr_warn("%s: %s: final rate %lu does not match desired rate %lu\n", | ||
511 | __func__, __clk_get_name(hw->clk), | ||
512 | rrate, rate); | ||
513 | rate = rrate; | ||
514 | } | ||
515 | } | ||
507 | 516 | ||
508 | if (dd->last_rounded_rate == 0) | 517 | if (dd->last_rounded_rate == 0) |
509 | return -EINVAL; | 518 | return -EINVAL; |