public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PM: OMAP3: Make sure clk_disable_unused() order is correct
@ 2008-11-12  9:42 Tero Kristo
  2008-11-13 13:55 ` Kevin Hilman
  0 siblings, 1 reply; 2+ messages in thread
From: Tero Kristo @ 2008-11-12  9:42 UTC (permalink / raw)
  To: linux-omap

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 <tero.kristo@nokia.com>
---
 arch/arm/mach-omap2/clock.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index dbbc7c8..522ce6f 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1012,7 +1012,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);
 	if (clk->clkdm.ptr != NULL)
 		pwrdm_clkdm_state_switch(clk->clkdm.ptr);
 }
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-13 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12  9:42 [PATCH] PM: OMAP3: Make sure clk_disable_unused() order is correct Tero Kristo
2008-11-13 13:55 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox