Skip to content

Commit e98580e

Browse files
Tero Kristotmlind
authored andcommitted
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>
1 parent 9fabc1a commit e98580e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm/mach-omap2/timer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
289289
if (!timer->io_base)
290290
return -ENXIO;
291291

292+
omap_hwmod_setup_one(oh_name);
293+
292294
/* After the dmtimer is using hwmod these clocks won't be needed */
293295
timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
294296
if (IS_ERR(timer->fclk))
@@ -303,7 +305,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
303305

304306
clk_put(src);
305307

306-
omap_hwmod_setup_one(oh_name);
307308
omap_hwmod_enable(oh);
308309
__omap_dm_timer_init_regs(timer);
309310

0 commit comments

Comments
 (0)