提交 273a1ce9 编写于 作者: M Mike Turquette 提交者: Paul Walmsley

ARM: OMAP3+: dpll: assign clk rate from rounded rate during rate set

The rounded rate can differ from target rate, so to better reflect
reality set clk->rate equal to the rounded rate when setting DPLL frequency.
This avoids issues where the DPLL frequency is slightly different than what
debugfs clock tree reports using the old target rate.

An example of a clock that requires this is DPLL_ABE on OMAP4 which
can have a 4x multiplier on top of the usual MN dividers depending on
register settings.  This requires a special round_rate function that
might yield a rate different from the initial target.
Signed-off-by: NMike Turquette <mturquette@ti.com>
Signed-off-by: NJon Hunter <jon-hunter@ti.com>
Signed-off-by: NPaul Walmsley <paul@pwsan.com>
上级 addf888c
...@@ -455,7 +455,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate) ...@@ -455,7 +455,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
new_parent = dd->clk_bypass; new_parent = dd->clk_bypass;
} else { } else {
if (dd->last_rounded_rate != rate) if (dd->last_rounded_rate != rate)
clk->round_rate(clk, rate); rate = clk->round_rate(clk, rate);
if (dd->last_rounded_rate == 0) if (dd->last_rounded_rate == 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册