diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap1/time.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer-gp.c | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/counter_32k.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/common.h | 1 |
4 files changed, 17 insertions, 4 deletions
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index ed7a61ff916..6ec65e59999 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -244,6 +244,13 @@ static void __init omap_timer_init(void) | |||
244 | 244 | ||
245 | omap_init_mpu_timer(rate); | 245 | omap_init_mpu_timer(rate); |
246 | omap_init_clocksource(rate); | 246 | omap_init_clocksource(rate); |
247 | /* | ||
248 | * XXX Since this file seems to deal mostly with the MPU timer, | ||
249 | * this doesn't seem like the correct place for the sync timer | ||
250 | * clocksource init. | ||
251 | */ | ||
252 | if (!cpu_is_omap7xx() && !cpu_is_omap15xx()) | ||
253 | omap_init_clocksource_32k(); | ||
247 | } | 254 | } |
248 | 255 | ||
249 | struct sys_timer omap_timer = { | 256 | struct sys_timer omap_timer = { |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 4e48e786bec..7b7c2683ae7 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -42,6 +42,8 @@ | |||
42 | 42 | ||
43 | #include "timer-gp.h" | 43 | #include "timer-gp.h" |
44 | 44 | ||
45 | #include <plat/common.h> | ||
46 | |||
45 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 47 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
46 | #define MAX_GPTIMER_ID 12 | 48 | #define MAX_GPTIMER_ID 12 |
47 | 49 | ||
@@ -176,10 +178,14 @@ static void __init omap2_gp_clockevent_init(void) | |||
176 | /* | 178 | /* |
177 | * When 32k-timer is enabled, don't use GPTimer for clocksource | 179 | * When 32k-timer is enabled, don't use GPTimer for clocksource |
178 | * instead, just leave default clocksource which uses the 32k | 180 | * instead, just leave default clocksource which uses the 32k |
179 | * sync counter. See clocksource setup in see plat-omap/common.c. | 181 | * sync counter. See clocksource setup in plat-omap/counter_32k.c |
180 | */ | 182 | */ |
181 | 183 | ||
182 | static inline void __init omap2_gp_clocksource_init(void) {} | 184 | static void __init omap2_gp_clocksource_init(void) |
185 | { | ||
186 | omap_init_clocksource_32k(); | ||
187 | } | ||
188 | |||
183 | #else | 189 | #else |
184 | /* | 190 | /* |
185 | * clocksource | 191 | * clocksource |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index ea4644021fb..0367998ff68 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -160,7 +160,7 @@ void read_persistent_clock(struct timespec *ts) | |||
160 | *ts = *tsp; | 160 | *ts = *tsp; |
161 | } | 161 | } |
162 | 162 | ||
163 | static int __init omap_init_clocksource_32k(void) | 163 | int __init omap_init_clocksource_32k(void) |
164 | { | 164 | { |
165 | static char err[] __initdata = KERN_ERR | 165 | static char err[] __initdata = KERN_ERR |
166 | "%s: can't register clocksource!\n"; | 166 | "%s: can't register clocksource!\n"; |
@@ -195,7 +195,6 @@ static int __init omap_init_clocksource_32k(void) | |||
195 | } | 195 | } |
196 | return 0; | 196 | return 0; |
197 | } | 197 | } |
198 | arch_initcall(omap_init_clocksource_32k); | ||
199 | 198 | ||
200 | #endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */ | 199 | #endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */ |
201 | 200 | ||
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 6b8088ec74a..84c707f713b 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -35,6 +35,7 @@ struct sys_timer; | |||
35 | 35 | ||
36 | extern void omap_map_common_io(void); | 36 | extern void omap_map_common_io(void); |
37 | extern struct sys_timer omap_timer; | 37 | extern struct sys_timer omap_timer; |
38 | extern int __init omap_init_clocksource_32k(void); | ||
38 | 39 | ||
39 | extern void omap_reserve(void); | 40 | extern void omap_reserve(void); |
40 | 41 | ||