diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-05-25 08:10:28 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-26 17:08:39 +0900 |
commit | c94a85746f7bdc13035acdf88c130d7b6fa41bde (patch) | |
tree | 8aff35100dcb0a62c82452357ea267f92376dc7a /arch/sh/include | |
parent | c9904dd15922f349b5f06839e34b1723d4a75940 (diff) | |
download | op-kernel-dev-c94a85746f7bdc13035acdf88c130d7b6fa41bde.zip op-kernel-dev-c94a85746f7bdc13035acdf88c130d7b6fa41bde.tar.gz |
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')
-rw-r--r-- | arch/sh/include/asm/clock.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h index 64c93cb..60d5d2b 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 */ |