Commit bde012e1 authored by Paul Walmsley's avatar Paul Walmsley Committed by Tony Lindgren

omap2 clock: call clock-specific enable/disable functions if present

Call clock-specific enable/disable functions if .enable/.disable function
pointer fields are present in struct clk.  Similar to OMAP1 clock code.
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 3484f0e9
......@@ -277,6 +277,9 @@ static int _omap2_clk_enable(struct clk * clk)
return 0;
}
if (clk->enable)
return clk->enable(clk);
if (unlikely(clk->enable_reg == 0)) {
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
clk->name);
......@@ -316,6 +319,11 @@ static void _omap2_clk_disable(struct clk *clk)
if (clk->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK))
return;
if (clk->disable) {
clk->disable(clk);
return;
}
if (unlikely(clk == &osc_ck)) {
omap2_set_osc_ck(0);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment