aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sh_clk.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-10-15 05:33:24 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-15 05:33:24 -0400
commit8e122db61c98debbc35e26dd29504958cbcf2cbb (patch)
tree4323f71c79fd3df0191c6489e84b50089797101f /include/linux/sh_clk.h
parentf586903d27e2503a3e7d427b3d665bbaf1b7f4d4 (diff)
sh: clkfwk: Add a helper for rate rounding by divisor ranges.
This adds a new clk_rate_div_range_round() for implementing rate rounding by divisor ranges. This can be used trivially by clocks that support arbitrary ranged divisors without the need for rate table construction. This should only be used by clocks that both have large divisor ranges in addition to clocks that will never be arbitrarily scaled, as the lack of a backing frequency table will prevent cpufreq from being able to do much of anything with them. Primarily intended for use as a ->recalc helper. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_clk.h')
-rw-r--r--include/linux/sh_clk.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
index 49f6e9b6eda2..4dca992f3093 100644
--- a/include/linux/sh_clk.h
+++ b/include/linux/sh_clk.h
@@ -119,6 +119,9 @@ int clk_rate_table_find(struct clk *clk,
119 struct cpufreq_frequency_table *freq_table, 119 struct cpufreq_frequency_table *freq_table,
120 unsigned long rate); 120 unsigned long rate);
121 121
122long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
123 unsigned int div_max, unsigned long rate);
124
122#define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \ 125#define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \
123{ \ 126{ \
124 .parent = _parent, \ 127 .parent = _parent, \