summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2016-06-30 16:15:01 +0300
committerTony Lindgren <tony@atomide.com>2016-07-04 07:15:28 -0700
commite98580e880fb88810a1cd2a1a2583371fc0aa19e (patch)
treef038b1509ad48812523c48d0717a124dc09b22cd /arch/arm/mach-omap2
parent9fabc1a26e37f88cb19d5def300970a26604d9a4 (diff)
downloadblackbird-obmc-linux-e98580e880fb88810a1cd2a1a2583371fc0aa19e.tar.gz
blackbird-obmc-linux-e98580e880fb88810a1cd2a1a2583371fc0aa19e.zip
ARM: OMAP2+: timer: change order of hwmod data handling
With the introduction of hwmod module clocks, the name of the hwmod main clk may not be available before hwmod setup, as hwmod setup may lookup the main clock dynamically based on the hwmod name. Thus, change the order of hwmod setup and main clock handling for the timer code, to make sure the main clock is going to be available. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 5b385bb8aff9..e7eccf6a4daf 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -289,6 +289,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!timer->io_base)
return -ENXIO;
+ omap_hwmod_setup_one(oh_name);
+
/* After the dmtimer is using hwmod these clocks won't be needed */
timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
if (IS_ERR(timer->fclk))
@@ -303,7 +305,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
clk_put(src);
- omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
__omap_dm_timer_init_regs(timer);
OpenPOWER on IntegriCloud