public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 3/6] OMAP3+: use DPLL's round_rate when setting rate
@ 2011-09-16 17:48 Jon Hunter
  2011-09-28  7:02 ` Paul Walmsley
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Hunter @ 2011-09-16 17:48 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap, linux-arm, Mike Turquette, Jon Hunter

From: Mike Turquette <mturquette@ti.com>

omap3_noncore_dpll_set_rate uses omap2_dpll_round_rate explicitly.  Instead
use the struct clk pointer's round_rate function to allow for DPLL's with
special needs.

Also 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 both of these needs 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: Mike Turquette <mturquette@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 arch/arm/mach-omap2/dpll3xxx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index f77022b..73a1595 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -455,7 +455,7 @@ int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
 			new_parent = dd->clk_bypass;
 	} else {
 		if (dd->last_rounded_rate != rate)
-			omap2_dpll_round_rate(clk, rate);
+			rate = clk->round_rate(clk, rate);
 
 		if (dd->last_rounded_rate == 0)
 			return -EINVAL;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-10-07 19:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16 17:48 [PATCH v3 3/6] OMAP3+: use DPLL's round_rate when setting rate Jon Hunter
2011-09-28  7:02 ` Paul Walmsley
2011-09-28 15:50   ` Jon Hunter
2011-09-28 22:39   ` Turquette, Mike
2011-09-30  0:51     ` [PATCH] OMAP2+: clock: use clock's recalc in DPLL handling Mike Turquette
2011-09-30  1:26       ` Paul Walmsley
2011-09-30  1:33         ` Turquette, Mike
2011-10-07  7:07       ` Paul Walmsley
2011-10-07 19:32         ` Turquette, Mike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox