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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user