diff options
author | Raghu Gandham <Raghu.Gandham@imgtec.com> | 2013-04-10 17:30:12 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-09 11:55:21 -0400 |
commit | 0ab2b7d08ea7226dc72ff0f8c05f470566facf7c (patch) | |
tree | 7b791c6907a47733b1256da5e20600d182b36d40 /arch/mips/kernel/cevt-r4k.c | |
parent | 2675fa7c7b46842f82b2766b5abe80e16ce32977 (diff) |
MIPS: Add new GIC clockevent driver.
Add new clockevent driver that uses the counter present on the MIPS
Global Interrupt Controller.
Signed-off-by: Raghu Gandham <Raghu.Gandham@imgtec.com>
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/cevt-r4k.c')
-rw-r--r-- | arch/mips/kernel/cevt-r4k.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 0309aefbf713..0613f468f1ad 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -72,6 +72,9 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) | |||
72 | /* Clear Count/Compare Interrupt */ | 72 | /* Clear Count/Compare Interrupt */ |
73 | write_c0_compare(read_c0_compare()); | 73 | write_c0_compare(read_c0_compare()); |
74 | cd = &per_cpu(mips_clockevent_device, cpu); | 74 | cd = &per_cpu(mips_clockevent_device, cpu); |
75 | #ifdef CONFIG_CEVT_GIC | ||
76 | if (!gic_present) | ||
77 | #endif | ||
75 | cd->event_handler(cd); | 78 | cd->event_handler(cd); |
76 | } | 79 | } |
77 | 80 | ||
@@ -203,6 +206,9 @@ int __cpuinit r4k_clockevent_init(void) | |||
203 | cd->set_mode = mips_set_clock_mode; | 206 | cd->set_mode = mips_set_clock_mode; |
204 | cd->event_handler = mips_event_handler; | 207 | cd->event_handler = mips_event_handler; |
205 | 208 | ||
209 | #ifdef CONFIG_CEVT_GIC | ||
210 | if (!gic_present) | ||
211 | #endif | ||
206 | clockevents_register_device(cd); | 212 | clockevents_register_device(cd); |
207 | 213 | ||
208 | if (cp0_timer_irq_installed) | 214 | if (cp0_timer_irq_installed) |