]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/arch/arm/mach-footbridge/isa-timer.c | |
3 | * | |
4 | * Copyright (C) 1998 Russell King. | |
5 | * Copyright (C) 1998 Phil Blundell | |
6 | */ | |
4e8d7637 | 7 | #include <linux/clockchips.h> |
334955ef | 8 | #include <linux/i8253.h> |
1da177e4 LT |
9 | #include <linux/init.h> |
10 | #include <linux/interrupt.h> | |
55e86989 | 11 | #include <linux/irq.h> |
8c414ff3 | 12 | #include <linux/spinlock.h> |
4e8d7637 | 13 | #include <linux/timex.h> |
1da177e4 | 14 | |
1da177e4 | 15 | #include <asm/irq.h> |
1da177e4 LT |
16 | #include <asm/mach/time.h> |
17 | ||
18 | #include "common.h" | |
19 | ||
4e8d7637 | 20 | static irqreturn_t pit_timer_interrupt(int irq, void *dev_id) |
1da177e4 | 21 | { |
4e8d7637 RK |
22 | struct clock_event_device *ce = dev_id; |
23 | ce->event_handler(ce); | |
1da177e4 LT |
24 | return IRQ_HANDLED; |
25 | } | |
26 | ||
4e8d7637 RK |
27 | static struct irqaction pit_timer_irq = { |
28 | .name = "pit", | |
29 | .handler = pit_timer_interrupt, | |
b30fabad | 30 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
8560a6cf | 31 | .dev_id = &i8253_clockevent, |
1da177e4 LT |
32 | }; |
33 | ||
6bb27d73 | 34 | void __init isa_timer_init(void) |
1da177e4 | 35 | { |
8c414ff3 | 36 | clocksource_i8253_init(); |
1da177e4 | 37 | |
8560a6cf TG |
38 | setup_irq(i8253_clockevent.irq, &pit_timer_irq); |
39 | clockevent_i8253_init(false); | |
1da177e4 | 40 | } |