Tomi Valkeinen 648a55e125 OMAPDSS: fix dss_fck clock rate rounding
DSS func clock is calculated with prate / div * m. However, the current
omapdss code calculates it with prate * m / div, which yields a slightly
different result when there's a remainder. For example, 432000000 / 14 *
2 = 61714284, but 432000000 * 2 / 14 = 61714285.

In addition to that, the clock framework wants the clock rate given with
clk_set_rate to be higher than the actual (truncated) end result. So, if
prate is 432000000, and div is 14, the real result is 30857142.8571...
We need to call clk_set_rate with 30857143, which gives us a clock of
30857142. That's why we need to use DIV_ROUND_UP() when calling
clk_set_rate.

This patch fixes the clock calculation.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-11 13:07:54 +03:00
..
2013-02-22 23:31:31 -05:00
2013-03-22 10:14:31 +02:00
2005-04-16 15:20:36 -07:00
2007-05-04 17:59:05 -07:00
2011-10-03 15:52:38 +00:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2009-01-12 20:56:32 +01:00
2013-02-22 23:31:31 -05:00
2013-01-24 09:04:04 +01:00
2013-02-21 17:22:17 -08:00
2012-02-15 04:31:21 +00:00
2012-01-22 14:50:02 +01:00
2011-09-14 16:40:52 +00:00
2008-04-28 08:58:41 -07:00
2012-10-12 10:21:02 +09:00
2011-06-24 17:14:39 +09:00
2011-07-04 16:02:48 +09:00