diff options
author | Tony Lindgren <tony@atomide.com> | 2011-03-29 18:54:49 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-06-27 15:14:01 -0400 |
commit | 11a0186f3ef6aa6a9b8b81f5a501b6063fa47500 (patch) | |
tree | cf48a0045d12479cc3a747e35b3b35ed93ba208c /arch/arm/mach-omap2/timer-gp.c | |
parent | 98e182a26bbbf5575457622337684ef61493e864 (diff) |
omap2+: Reserve clocksource and timesource and initialize dmtimer later
There's no need to initialize the dmtimer framework early.
Just mark the clocksource and timesource as reserved, and
initialize dmtimer with an arch_initcall.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/timer-gp.c')
-rw-r--r-- | arch/arm/mach-omap2/timer-gp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 578e9df4fdea..cf2ec85b95fa 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -69,6 +69,8 @@ | |||
69 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 69 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
70 | #define MAX_GPTIMER_ID 12 | 70 | #define MAX_GPTIMER_ID 12 |
71 | 71 | ||
72 | u32 sys_timer_reserved; | ||
73 | |||
72 | /* Clockevent code */ | 74 | /* Clockevent code */ |
73 | 75 | ||
74 | static struct omap_dm_timer clkev; | 76 | static struct omap_dm_timer clkev; |
@@ -195,6 +197,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
195 | 197 | ||
196 | omap_hwmod_enable(oh); | 198 | omap_hwmod_enable(oh); |
197 | 199 | ||
200 | sys_timer_reserved |= (1 << (gptimer_id - 1)); | ||
201 | |||
198 | if (gptimer_id != 12) { | 202 | if (gptimer_id != 12) { |
199 | struct clk *src; | 203 | struct clk *src; |
200 | 204 | ||
@@ -321,7 +325,6 @@ static void __init omap2_gp_clocksource_init(void) | |||
321 | #define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src) \ | 325 | #define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src) \ |
322 | static void __init omap##name##_timer_init(void) \ | 326 | static void __init omap##name##_timer_init(void) \ |
323 | { \ | 327 | { \ |
324 | omap_dm_timer_init(); \ | ||
325 | omap2_gp_clockevent_init((clkev_nr), clkev_src); \ | 328 | omap2_gp_clockevent_init((clkev_nr), clkev_src); \ |
326 | omap2_gp_clocksource_init(); \ | 329 | omap2_gp_clocksource_init(); \ |
327 | } | 330 | } |
@@ -350,7 +353,6 @@ static void __init omap4_timer_init(void) | |||
350 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); | 353 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); |
351 | BUG_ON(!twd_base); | 354 | BUG_ON(!twd_base); |
352 | #endif | 355 | #endif |
353 | omap_dm_timer_init(); | ||
354 | omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE); | 356 | omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE); |
355 | omap2_gp_clocksource_init(); | 357 | omap2_gp_clocksource_init(); |
356 | } | 358 | } |