From: Tero Kristo Date: Wed, 12 Nov 2008 09:42:10 +0000 (+0200) Subject: PM: OMAP3: Make sure clk_disable_unused() order is correct X-Git-Tag: v2.6.28-omap1~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=672680063420ef8c8c4e7271984bb9cc08171d29;p=linux-2.6-omap-h63xx.git PM: OMAP3: Make sure clk_disable_unused() order is correct Current implementation will disable clocks in the order defined in clock34xx.h, at least DPLL4_M2X2 will hang in certain cases (and prevent retention / off) if clocks are not disabled in correct order. This patch makes sure the parent clocks will be active when disabling a clock. Signed-off-by: Tero Kristo Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 413fb684e9c..4344f5e7923 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -1077,7 +1077,11 @@ void omap2_clk_disable_unused(struct clk *clk) return; printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name); - _omap2_clk_disable(clk); + if (cpu_is_omap34xx()) { + omap2_clk_enable(clk); + omap2_clk_disable(clk); + } else + _omap2_clk_disable(clk); } #endif