diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-29 10:23:43 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-29 15:35:36 -0400 |
commit | 38760d40ca61b18b2809e9c28df8b3ff9af8a02b (patch) | |
tree | dd65b99f1ae919498808506121a2b75217997713 /arch/mips/kernel/cevt-r4k.c | |
parent | 1238d5d868a56dcbc743d3ffc9bd3c920258b4cb (diff) |
[MIPS] time: Replace plat_timer_setup with modern APIs.
plat_timer_setup is no longer getting called.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/cevt-r4k.c')
-rw-r--r-- | arch/mips/kernel/cevt-r4k.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index a59f67ff301e..bab935a3d74b 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -224,7 +224,7 @@ void __cpuinit mips_clockevent_init(void) | |||
224 | uint64_t mips_freq = mips_hpt_frequency; | 224 | uint64_t mips_freq = mips_hpt_frequency; |
225 | unsigned int cpu = smp_processor_id(); | 225 | unsigned int cpu = smp_processor_id(); |
226 | struct clock_event_device *cd; | 226 | struct clock_event_device *cd; |
227 | unsigned int irq = MIPS_CPU_IRQ_BASE + 7; | 227 | unsigned int irq; |
228 | 228 | ||
229 | if (!cpu_has_counter || !mips_hpt_frequency) | 229 | if (!cpu_has_counter || !mips_hpt_frequency) |
230 | return; | 230 | return; |
@@ -243,6 +243,15 @@ void __cpuinit mips_clockevent_init(void) | |||
243 | if (!c0_compare_int_usable()) | 243 | if (!c0_compare_int_usable()) |
244 | return; | 244 | return; |
245 | 245 | ||
246 | /* | ||
247 | * With vectored interrupts things are getting platform specific. | ||
248 | * get_c0_compare_int is a hook to allow a platform to return the | ||
249 | * interrupt number of it's liking. | ||
250 | */ | ||
251 | irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; | ||
252 | if (get_c0_compare_int) | ||
253 | irq = get_c0_compare_int(); | ||
254 | |||
246 | cd = &per_cpu(mips_clockevent_device, cpu); | 255 | cd = &per_cpu(mips_clockevent_device, cpu); |
247 | 256 | ||
248 | cd->name = "MIPS"; | 257 | cd->name = "MIPS"; |
@@ -267,13 +276,15 @@ void __cpuinit mips_clockevent_init(void) | |||
267 | 276 | ||
268 | clockevents_register_device(cd); | 277 | clockevents_register_device(cd); |
269 | 278 | ||
270 | if (!cp0_timer_irq_installed) { | 279 | if (!cp0_timer_irq_installed) |
280 | return; | ||
281 | |||
282 | cp0_timer_irq_installed = 1; | ||
283 | |||
271 | #ifdef CONFIG_MIPS_MT_SMTC | 284 | #ifdef CONFIG_MIPS_MT_SMTC |
272 | #define CPUCTR_IMASKBIT (0x100 << cp0_compare_irq) | 285 | #define CPUCTR_IMASKBIT (0x100 << cp0_compare_irq) |
273 | setup_irq_smtc(irq, &c0_compare_irqaction, CPUCTR_IMASKBIT); | 286 | setup_irq_smtc(irq, &c0_compare_irqaction, CPUCTR_IMASKBIT); |
274 | #else | 287 | #else |
275 | setup_irq(irq, &c0_compare_irqaction); | 288 | setup_irq(irq, &c0_compare_irqaction); |
276 | #endif /* CONFIG_MIPS_MT_SMTC */ | 289 | #endif |
277 | cp0_timer_irq_installed = 1; | ||
278 | } | ||
279 | } | 290 | } |