public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Rounding issue in drivers/clk/clk-divider.c
@ 2013-10-08 13:17 Tomi Valkeinen
  2013-10-09 12:43 ` Tomi Valkeinen
  0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2013-10-08 13:17 UTC (permalink / raw)
  To: Mike Turquette, linux-kernel; +Cc: Kristo, Tero, Shawn Guo

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

Hi,

I'm seeing the following issue on omap3 with dpll4_m4 clock. dpll4_m4's
parent is a PLL set to 864000000 and dpll4_m4 is a divider, handled by
clk-divider.c.

Now, if I call clk_round_rate(dpll4_m4, 143999999), I get 123428571
which is correct. However, if I call clk_round_rate(dpll4_m4,
123428571), I would presume to get the same answer, 123428571, as that
was already "verified" by the previous clk_round_rate() call. However, I
get 108000000.

So, if I have the following code:

rate = clk_round_rate(dpll4_m4, 143999999);
/* rate is 123428571 */
clk_set_rate(dpll4_m4, rate);

the resulting rate is 108000000.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

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

end of thread, other threads:[~2013-10-28  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 13:17 Rounding issue in drivers/clk/clk-divider.c Tomi Valkeinen
2013-10-09 12:43 ` Tomi Valkeinen
2013-10-28  9:39   ` Tomi Valkeinen

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