From: Paul Walmsley Date: Mon, 27 Aug 2007 08:39:17 +0000 (-0600) Subject: omap2 clock: call clock-specific enable/disable functions if present X-Git-Tag: v2.6.23-omap1~106 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bde012e1e6069404c01c515cad975b68302b4235;p=linux-2.6-omap-h63xx.git 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: Paul Walmsley Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index f5ff8cd3977..ad84869226a 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -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;