summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/cevt-r4k.c
diff options
context:
space:
mode:
authorRaghu Gandham <Raghu.Gandham@imgtec.com>2013-04-10 23:30:12 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-05-09 17:55:21 +0200
commit0ab2b7d08ea7226dc72ff0f8c05f470566facf7c (patch)
tree7b791c6907a47733b1256da5e20600d182b36d40 /arch/mips/kernel/cevt-r4k.c
parentMIPS: Formatting clean-ups for clocksources. (diff)
downloadlinux-0ab2b7d08ea7226dc72ff0f8c05f470566facf7c.tar.xz
linux-0ab2b7d08ea7226dc72ff0f8c05f470566facf7c.zip
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.c6
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)
/* Clear Count/Compare Interrupt */
write_c0_compare(read_c0_compare());
cd = &per_cpu(mips_clockevent_device, cpu);
+#ifdef CONFIG_CEVT_GIC
+ if (!gic_present)
+#endif
cd->event_handler(cd);
}
@@ -203,6 +206,9 @@ int __cpuinit r4k_clockevent_init(void)
cd->set_mode = mips_set_clock_mode;
cd->event_handler = mips_event_handler;
+#ifdef CONFIG_CEVT_GIC
+ if (!gic_present)
+#endif
clockevents_register_device(cd);
if (cp0_timer_irq_installed)