Commit graph

4 commits

Author SHA1 Message Date
Paul Mundt a766b29790 sh: clkfwk: Fix up checkpatch warnings.
The clk_round_parent() change introduced various checkpatch warnings,
tidy them up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-08 09:40:23 +09:00
Guennadi Liakhovetski 6af26c6c99 sh: add clk_round_parent() to optimize parent clock rate
Sometimes it is possible and reasonable to adjust the parent clock rate to
improve precision of the child clock, e.g., if the child clock has no siblings.
clk_round_parent() is a new addition to the SH clock-framework API, that
implements such an optimization for child clocks with divisors, taking all
integer values in a range.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-08 09:35:26 +09:00
Paul Mundt 5aefa34fad sh: clkfwk: Fix up rate rounding error handling.
According to the linux/clk.h definition we should be handing back an
errno value or a valid rate. This fixes up the case where 0 can be
returned for invalid frequencies or cases where rounding has no
selectable candidate.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-01 15:30:31 -04:00
Paul Mundt de9186c257 sh: clkfwk: Shuffle around to match the intc split up.
This shuffles the clock framework code around to a drivers/sh/clk subdir,
to follow the intc split up. This will make it easier to subsequently
break things out as well as plug in different helpers for non-CPG users.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-18 21:32:58 +09:00
Renamed from drivers/sh/clk.c (Browse further)