MIPS: microMIPS: Floating point support.
[deliverable/linux.git] / arch / mips / kernel / i8253.c
CommitLineData
d865bea4
RB
1/*
2 * i8253.c 8253/PIT functions
3 *
4 */
5#include <linux/clockchips.h>
334955ef 6#include <linux/i8253.h>
73bc256d 7#include <linux/export.h>
631330f5 8#include <linux/smp.h>
ca4d3e67 9#include <linux/irq.h>
d865bea4 10
dd3db6eb 11#include <asm/time.h>
d865bea4 12
dd3db6eb 13static irqreturn_t timer_interrupt(int irq, void *dev_id)
d865bea4 14{
ded7c1ee 15 i8253_clockevent.event_handler(&i8253_clockevent);
d865bea4
RB
16
17 return IRQ_HANDLED;
18}
19
20static struct irqaction irq0 = {
21 .handler = timer_interrupt,
8b5690f8 22 .flags = IRQF_NOBALANCING | IRQF_TIMER,
d865bea4
RB
23 .name = "timer"
24};
25
d865bea4
RB
26void __init setup_pit_timer(void)
27{
2d02612f 28 clockevent_i8253_init(true);
d865bea4
RB
29 setup_irq(0, &irq0);
30}
31
d865bea4
RB
32static int __init init_pit_clocksource(void)
33{
34 if (num_possible_cpus() > 1) /* PIT does not scale! */
35 return 0;
36
798778b8 37 return clocksource_i8253_init();
d865bea4
RB
38}
39arch_initcall(init_pit_clocksource);
This page took 0.549108 seconds and 5 git commands to generate.