diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-07-20 00:38:49 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-07-20 00:38:49 -0400 |
commit | da9f0ac2f1c00b415939f6b00ee0ea19650377d0 (patch) | |
tree | 5cc6b750c0e63f61eb8c1df26ec394b1d602e973 /arch/sh/kernel/cpu/clock.c | |
parent | bd5f0d1c256fdf286fab358a04e87476e3535075 (diff) | |
parent | cb5ec75b8b0410bba4ae612d13a2f26e938bc49c (diff) |
Merge branch 'clkfwk'
Diffstat (limited to 'arch/sh/kernel/cpu/clock.c')
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 63251549e9a8..92807ffa8e20 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -229,6 +229,22 @@ void clk_recalc_rate(struct clk *clk) | |||
229 | } | 229 | } |
230 | EXPORT_SYMBOL_GPL(clk_recalc_rate); | 230 | EXPORT_SYMBOL_GPL(clk_recalc_rate); |
231 | 231 | ||
232 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
233 | { | ||
234 | if (likely(clk->ops && clk->ops->round_rate)) { | ||
235 | unsigned long flags, rounded; | ||
236 | |||
237 | spin_lock_irqsave(&clock_lock, flags); | ||
238 | rounded = clk->ops->round_rate(clk, rate); | ||
239 | spin_unlock_irqrestore(&clock_lock, flags); | ||
240 | |||
241 | return rounded; | ||
242 | } | ||
243 | |||
244 | return clk_get_rate(clk); | ||
245 | } | ||
246 | EXPORT_SYMBOL_GPL(clk_round_rate); | ||
247 | |||
232 | /* | 248 | /* |
233 | * Returns a clock. Note that we first try to use device id on the bus | 249 | * Returns a clock. Note that we first try to use device id on the bus |
234 | * and clock name. If this fails, we try to use clock name only. | 250 | * and clock name. If this fails, we try to use clock name only. |