aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/clock.h
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-05-25 08:10:28 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-05-26 17:08:39 +0900
commitc94a85746f7bdc13035acdf88c130d7b6fa41bde (patch)
tree8aff35100dcb0a62c82452357ea267f92376dc7a /arch/sh/include/asm/clock.h
parentc9904dd15922f349b5f06839e34b1723d4a75940 (diff)
sh: add shared clock framework frequency table code
Add SuperH-specific clock framework helper functions: - clk_rate_table_build() - build cpufreq table from divisors/multipliers - clk_rate_table_round() - use cpufreq table to find matching frequency Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/clock.h')
-rw-r--r--arch/sh/include/asm/clock.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index 64c93cb3d68..60d5d2bc714 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -100,4 +100,22 @@ enum clk_sh_algo_id {
IP_N1,
};
+struct clk_div_mult_table {
+ unsigned int *divisors;
+ unsigned int nr_divisors;
+ unsigned int *multipliers;
+ unsigned int nr_multipliers;
+};
+
+struct cpufreq_frequency_table;
+void clk_rate_table_build(struct clk *clk,
+ struct cpufreq_frequency_table *freq_table,
+ int nr_freqs,
+ struct clk_div_mult_table *src_table,
+ unsigned long *bitmap);
+
+long clk_rate_table_round(struct clk *clk,
+ struct cpufreq_frequency_table *freq_table,
+ unsigned long rate);
+
#endif /* __ASM_SH_CLOCK_H */