summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock-cpg.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-02-19 09:22:25 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-02-22 19:11:20 +0900
commit0a5f337ecd20e70e84a5cfc0f2c24d0366087026 (patch)
tree947f3063cb56ca8e7b168b46432b1bd35475e075 /arch/sh/kernel/cpu/clock-cpg.c
parentde7ca2144c36291a491bd39afad172f56432a4bb (diff)
sh: introduce struct clk_div4_table
This patch introduces struct clk_div4_table. The structure will be used to keep div4 specific data, and is with this patch replacing the struct clk_div_mult_table pointer arg used by the sh_clk_div4_register() functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/clock-cpg.c')
-rw-r--r--arch/sh/kernel/cpu/clock-cpg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 72a5e621a9b..1fc8a0e5060 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -149,7 +149,8 @@ int __init sh_clk_div6_register(struct clk *clks, int nr)
static unsigned long sh_clk_div4_recalc(struct clk *clk)
{
- struct clk_div_mult_table *table = clk->priv;
+ struct clk_div4_table *d4t = clk->priv;
+ struct clk_div_mult_table *table = d4t->div_mult_table;
unsigned int idx;
clk_rate_table_build(clk, clk->freq_table, table->nr_divisors,
@@ -162,7 +163,8 @@ static unsigned long sh_clk_div4_recalc(struct clk *clk)
static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
{
- struct clk_div_mult_table *table = clk->priv;
+ struct clk_div4_table *d4t = clk->priv;
+ struct clk_div_mult_table *table = d4t->div_mult_table;
u32 value;
int ret;
@@ -234,11 +236,11 @@ static struct clk_ops sh_clk_div4_reparent_clk_ops = {
};
static int __init sh_clk_div4_register_ops(struct clk *clks, int nr,
- struct clk_div_mult_table *table, struct clk_ops *ops)
+ struct clk_div4_table *table, struct clk_ops *ops)
{
struct clk *clkp;
void *freq_table;
- int nr_divs = table->nr_divisors;
+ int nr_divs = table->div_mult_table->nr_divisors;
int freq_table_size = sizeof(struct cpufreq_frequency_table);
int ret = 0;
int k;
@@ -267,20 +269,20 @@ static int __init sh_clk_div4_register_ops(struct clk *clks, int nr,
}
int __init sh_clk_div4_register(struct clk *clks, int nr,
- struct clk_div_mult_table *table)
+ struct clk_div4_table *table)
{
return sh_clk_div4_register_ops(clks, nr, table, &sh_clk_div4_clk_ops);
}
int __init sh_clk_div4_enable_register(struct clk *clks, int nr,
- struct clk_div_mult_table *table)
+ struct clk_div4_table *table)
{
return sh_clk_div4_register_ops(clks, nr, table,
&sh_clk_div4_enable_clk_ops);
}
int __init sh_clk_div4_reparent_register(struct clk *clks, int nr,
- struct clk_div_mult_table *table)
+ struct clk_div4_table *table)
{
return sh_clk_div4_register_ops(clks, nr, table,
&sh_clk_div4_reparent_clk_ops);