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: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
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);
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;