diff mbox

[09/26] ARM: OMAP2+: hwmod: Invoke init_clkdm before other init functions

Message ID 1352337181-29427-10-git-send-email-mturquette@ti.com
State Accepted
Commit b797be1d4c079e78a3cb4e95f4a74274a4aef9f5
Headers show

Commit Message

Mike Turquette Nov. 8, 2012, 1:12 a.m. UTC
From: Vaibhav Hiremath <hvaibhav@ti.com>

Without this kernel would crash, since clkdm inside omap_hwmod
is accessed in some of the init funtion like, _init_main_clk.

So call init_clkdm before _init_main_clk().

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mike Turquette <mturquette@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index ce93ec0..22a41f6 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1522,11 +1522,12 @@  static int _init_clocks(struct omap_hwmod *oh, void *data)
 
 	pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name);
 
+	if (soc_ops.init_clkdm)
+		ret |= soc_ops.init_clkdm(oh);
+
 	ret |= _init_main_clk(oh);
 	ret |= _init_interface_clks(oh);
 	ret |= _init_opt_clks(oh);
-	if (soc_ops.init_clkdm)
-		ret |= soc_ops.init_clkdm(oh);
 
 	if (!ret)
 		oh->_state = _HWMOD_STATE_CLKS_INITED;