diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-05-18 18:40:24 -0600 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-05-20 12:31:06 -0600 |
commit | 435699db6a3d81bfd36d25150177399a4f6048d5 (patch) | |
tree | f6fa03a580c900178ea6b2b0c64e9272460d3cd3 /arch/arm/mach-omap2/clock.c | |
parent | d74b4949714741f4c58cd1801a6a92737b89a61c (diff) |
OMAP2+ clock: clean up clkt_clksel.c
This patch cleans up arch/arm/mach-omap2/clkt_clksel.c. It:
- makes several functions static that are not called outside the file;
- adds documentation;
- makes some code paths easier to read (hopefully), by breaking up
compound statements and removing redundant checks;
- converts some pr_err()s that indicate clock tree data problems into WARN()s,
so they are more likely to be noticed;
- and moves omap2_clk_round_rate() back into mach-omap2/clock.c, its proper
home, since it is not clksel-specific.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index a6d0b34b799..605f531783a 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -334,6 +334,15 @@ oce_err1: return ret; } +/* Given a clock and a rate apply a clock specific rounding function */ +long omap2_clk_round_rate(struct clk *clk, unsigned long rate) +{ + if (clk->round_rate) + return clk->round_rate(clk, rate); + + return clk->rate; +} + /* Set the clock rate for a clock source */ int omap2_clk_set_rate(struct clk *clk, unsigned long rate) { |