linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: OMAP2+: Fix dpll rounding
@ 2014-01-17  7:44 Tomi Valkeinen
  2014-01-17  7:44 ` [PATCH 1/2] ARM: OMAP2+: fix rate prints Tomi Valkeinen
  2014-01-17  7:44 ` [PATCH 2/2] ARM: OMAP2+: fix dpll round_rate() to actually round Tomi Valkeinen
  0 siblings, 2 replies; 20+ messages in thread
From: Tomi Valkeinen @ 2014-01-17  7:44 UTC (permalink / raw)
  To: Tero Kristo, Tony Lindgren, linux-arm-kernel, linux-omap,
	Mike Turquette, Paul Walmsley
  Cc: Tomi Valkeinen

Hi,

We had a problem with beaglebone black's HDMI output, where setting some clock
rates to the display PLL failed oddly. The main issue was that the dpll code
doesn't actually try to round the given rate, it only finds exact matches. That
is what these patches fix (well, the second patch).

However, there is another issue, which made finding and debugging this a bit
difficult. When the dpll round_rate failed, it returned ~0 as a rate. However,
drivers/clk/clk-divider.c, which called the round_rate, didn't realize that is
an error value, and so didn't fail but proceeded, which didn't lead to anything
good.

This series doesn't try to fix that other issue.

There's also a third issue that I think happens more easily after this series
is applied: there are no checks for maximum rate for the DPLLs. I think the
maximum rate is generally 2GHz, but at least my BeagleBone Black refused to
lock the display PLL with anything over 1.3GHz-1.4GHz.

High PLL clock rates happen quite easily with a setup where there's a DPLL and
an additional divider, handled by clk-divider.c. When the clk-divider.c is
asked to provide a clock rate (that could be quite low), it'll try to find a
good clock from its parent, the DPLL, that it can divide down to the requested
clock. As the DPLL driver is only limited by its multiplier and divider
register widths, it'll gladly offer 2GHz+ clocks, which eventually will fail as
they can't be locked.

So this series is only a partial fix for the clock issues. Also, while the
board debugged was BB Black, I think the same code is used and thus the same
issues are present on all (or most) omap2+ SoCs.

 Tomi

Tomi Valkeinen (2):
  ARM: OMAP2+: fix rate prints
  ARM: OMAP2+: fix dpll round_rate() to actually round

 arch/arm/mach-omap2/clkt_dpll.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

-- 
1.8.3.2

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

end of thread, other threads:[~2014-05-12 12:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17  7:44 [PATCH 0/2] ARM: OMAP2+: Fix dpll rounding Tomi Valkeinen
2014-01-17  7:44 ` [PATCH 1/2] ARM: OMAP2+: fix rate prints Tomi Valkeinen
2014-02-19 19:25   ` Paul Walmsley
2014-01-17  7:44 ` [PATCH 2/2] ARM: OMAP2+: fix dpll round_rate() to actually round Tomi Valkeinen
2014-02-13 23:00   ` Tony Lindgren
2014-02-14 13:32     ` Tero Kristo
2014-02-19 19:49   ` Paul Walmsley
2014-02-20 19:30     ` Paul Walmsley
2014-02-26 11:48       ` Tomi Valkeinen
2014-03-05 13:50       ` Tomi Valkeinen
2014-04-30 15:38         ` Felipe Balbi
2014-04-30 15:40         ` Nishanth Menon
2014-02-26 11:42     ` Tomi Valkeinen
2014-04-24 18:34       ` Felipe Balbi
2014-04-24 18:29   ` Felipe Balbi
2014-04-24 18:44     ` Tony Lindgren
2014-04-29 15:51       ` Felipe Balbi
2014-04-29 16:27         ` Tomi Valkeinen
2014-05-07 22:16           ` Paul Walmsley
2014-05-12 12:11             ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).