diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dw_apb_timer.h | 56 | ||||
-rw-r--r-- | include/linux/irq.h | 5 |
2 files changed, 56 insertions, 5 deletions
diff --git a/include/linux/dw_apb_timer.h b/include/linux/dw_apb_timer.h new file mode 100644 index 000000000000..49638ea3b776 --- /dev/null +++ b/include/linux/dw_apb_timer.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2009 Intel Corporation | ||
3 | * Author: Jacob Pan (jacob.jun.pan@intel.com) | ||
4 | * | ||
5 | * Shared with ARM platforms, Jamie Iles, Picochip 2011 | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Support for the Synopsys DesignWare APB Timers. | ||
12 | */ | ||
13 | #ifndef __DW_APB_TIMER_H__ | ||
14 | #define __DW_APB_TIMER_H__ | ||
15 | |||
16 | #include <linux/clockchips.h> | ||
17 | #include <linux/clocksource.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | |||
20 | #define APBTMRS_REG_SIZE 0x14 | ||
21 | |||
22 | struct dw_apb_timer { | ||
23 | void __iomem *base; | ||
24 | unsigned long freq; | ||
25 | int irq; | ||
26 | }; | ||
27 | |||
28 | struct dw_apb_clock_event_device { | ||
29 | struct clock_event_device ced; | ||
30 | struct dw_apb_timer timer; | ||
31 | struct irqaction irqaction; | ||
32 | void (*eoi)(struct dw_apb_timer *); | ||
33 | }; | ||
34 | |||
35 | struct dw_apb_clocksource { | ||
36 | struct dw_apb_timer timer; | ||
37 | struct clocksource cs; | ||
38 | }; | ||
39 | |||
40 | void dw_apb_clockevent_register(struct dw_apb_clock_event_device *dw_ced); | ||
41 | void dw_apb_clockevent_pause(struct dw_apb_clock_event_device *dw_ced); | ||
42 | void dw_apb_clockevent_resume(struct dw_apb_clock_event_device *dw_ced); | ||
43 | void dw_apb_clockevent_stop(struct dw_apb_clock_event_device *dw_ced); | ||
44 | |||
45 | struct dw_apb_clock_event_device * | ||
46 | dw_apb_clockevent_init(int cpu, const char *name, unsigned rating, | ||
47 | void __iomem *base, int irq, unsigned long freq); | ||
48 | struct dw_apb_clocksource * | ||
49 | dw_apb_clocksource_init(unsigned rating, char *name, void __iomem *base, | ||
50 | unsigned long freq); | ||
51 | void dw_apb_clocksource_register(struct dw_apb_clocksource *dw_cs); | ||
52 | void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs); | ||
53 | cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs); | ||
54 | void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs); | ||
55 | |||
56 | #endif /* __DW_APB_TIMER_H__ */ | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index baa397eb9c33..5f695041090c 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -96,11 +96,6 @@ enum { | |||
96 | 96 | ||
97 | #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) | 97 | #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) |
98 | 98 | ||
99 | static inline __deprecated bool CHECK_IRQ_PER_CPU(unsigned int status) | ||
100 | { | ||
101 | return status & IRQ_PER_CPU; | ||
102 | } | ||
103 | |||
104 | /* | 99 | /* |
105 | * Return value for chip->irq_set_affinity() | 100 | * Return value for chip->irq_set_affinity() |
106 | * | 101 | * |