aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2017-12-22 04:26:03 -0500
committerTony Lindgren <tony@atomide.com>2017-12-22 13:48:07 -0500
commit392ea5dd0ff265f7557405fcbdf35acd34cf4ab8 (patch)
tree551de581956e5a28c8d0aa73cc96ae59ee95469b /arch/arm/mach-omap2/omap_hwmod.c
parent234c91d4a350835df8362f6bc968ccf052c60d58 (diff)
ARM: OMAP2+: hwmod_core: enable optional clocks before main clock
The optional clocks must be enabled before the main clock after the transition to clkctrl controlled clocks is done. Otherwise the module we attempt to enable might be stuck in transition. Reported-by: Keerthy <j-keerthy@ti.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 5eff27e4f24b..b1d446c57556 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -975,6 +975,9 @@ static int _enable_clocks(struct omap_hwmod *oh)
975 975
976 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); 976 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
977 977
978 if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
979 _enable_optional_clocks(oh);
980
978 if (oh->_clk) 981 if (oh->_clk)
979 clk_enable(oh->_clk); 982 clk_enable(oh->_clk);
980 983
@@ -983,9 +986,6 @@ static int _enable_clocks(struct omap_hwmod *oh)
983 clk_enable(os->_clk); 986 clk_enable(os->_clk);
984 } 987 }
985 988
986 if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
987 _enable_optional_clocks(oh);
988
989 /* The opt clocks are controlled by the device driver. */ 989 /* The opt clocks are controlled by the device driver. */
990 990
991 return 0; 991 return 0;