summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock-cpg.c
diff options
context:
space:
mode:
authorMagnus Damm2010-02-19 10:26:56 +0100
committerPaul Mundt2010-02-22 11:11:22 +0100
commit7be85c6eb4462cd973e680d9dcf897a7b5b26165 (patch)
tree5da0ed4f9d6e24676cca7db071ba3380ee6c0cd7 /arch/sh/kernel/cpu/clock-cpg.c
parentsh: introduce struct clk_div4_table (diff)
downloadkernel-qcow2-linux-7be85c6eb4462cd973e680d9dcf897a7b5b26165.tar.gz
kernel-qcow2-linux-7be85c6eb4462cd973e680d9dcf897a7b5b26165.tar.xz
kernel-qcow2-linux-7be85c6eb4462cd973e680d9dcf897a7b5b26165.zip
sh: add sh7724 kick callback to clk_div4_table
This patch adds a ->kick() callback to clk_div4_table and ties it into sh_clk_div4_set_rate(). A sh7724 specific kick function is also added that updates the KICK bit whenever div4 clocks in FRQCRA and FRQCRB have been set. Allows us to set the VPU clock. 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 1fc8a0e50603..eed5eaff96ba 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -188,6 +188,7 @@ static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
static int sh_clk_div4_set_rate(struct clk *clk, unsigned long rate, int algo_id)
{
+ struct clk_div4_table *d4t = clk->priv;
unsigned long value;
int idx = clk_rate_table_find(clk, clk->freq_table, rate);
if (idx < 0)
@@ -198,6 +199,9 @@ static int sh_clk_div4_set_rate(struct clk *clk, unsigned long rate, int algo_id
value |= (idx << clk->enable_bit);
__raw_writel(value, clk->enable_reg);
+ if (d4t->kick)
+ d4t->kick(clk);
+
return 0;
}