ARM: OMAP2+: hwmod: Invoke init_clkdm before other init functions
authorVaibhav Hiremath <hvaibhav@ti.com>
Mon, 9 Jul 2012 12:54:30 +0000 (18:24 +0530)
committerPaul Walmsley <paul@pwsan.com>
Tue, 13 Nov 2012 02:10:19 +0000 (19:10 -0700)
Without this kernel would crash, since clkdm inside omap_hwmod
is accessed in some of the init functions 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>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/omap_hwmod.c

index f38e4cefa2a5b97a65d5992ec17f66729db870ac..c3d3e62a5ac245311b72da067f0db25050e1fb7b 100644 (file)
@@ -1519,11 +1519,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;