Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / mach-footbridge / isa-timer.c
blob723e3eae995d70cfc80d85a2f44969c295b87b2d
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * linux/arch/arm/mach-footbridge/isa-timer.c
5 * Copyright (C) 1998 Russell King.
6 * Copyright (C) 1998 Phil Blundell
7 */
8 #include <linux/clockchips.h>
9 #include <linux/i8253.h>
10 #include <linux/init.h>
11 #include <linux/interrupt.h>
12 #include <linux/irq.h>
13 #include <linux/spinlock.h>
14 #include <linux/timex.h>
16 #include <asm/irq.h>
17 #include <asm/mach/time.h>
19 #include "common.h"
21 static irqreturn_t pit_timer_interrupt(int irq, void *dev_id)
23 struct clock_event_device *ce = dev_id;
24 ce->event_handler(ce);
25 return IRQ_HANDLED;
28 void __init isa_timer_init(void)
30 clocksource_i8253_init();
32 if (request_irq(i8253_clockevent.irq, pit_timer_interrupt,
33 IRQF_TIMER | IRQF_IRQPOLL, "pit", &i8253_clockevent))
34 pr_err("Failed to request irq %d(pit)\n", i8253_clockevent.irq);
35 clockevent_i8253_init(false);