diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-02 18:07:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-02 18:07:45 -0400 |
commit | b4b9034132c7e1e4474999e688dd7d03b7d97a99 (patch) | |
tree | c02c571b9e0e59b9ffa18baae23c83f09ff07adb /include | |
parent | a8c4c20dfa8b28a3c99e33c639d9c2ea5657741e (diff) | |
parent | 07d265dd59456f702b7d2a1ac471f06ee4adc9ef (diff) |
Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm: (24 commits)
[ARM] 3683/2: ARM: Convert at91rm9200 to generic irq handling
[ARM] 3682/2: ARM: Convert ixp4xx to generic irq handling
[ARM] 3702/1: ARM: Convert ixp23xx to generic irq handling
[ARM] 3701/1: ARM: Convert plat-omap to generic irq handling
[ARM] 3700/1: ARM: Convert lh7a40x to generic irq handling
[ARM] 3699/1: ARM: Convert s3c2410 to generic irq handling
[ARM] 3698/1: ARM: Convert sa1100 to generic irq handling
[ARM] 3697/1: ARM: Convert shark to generic irq handling
[ARM] 3696/1: ARM: Convert clps711x to generic irq handling
[ARM] 3694/1: ARM: Convert ecard driver to generic irq handling
[ARM] 3693/1: ARM: Convert omap1 to generic irq handling
[ARM] 3691/1: ARM: Convert imx to generic irq handling
[ARM] 3688/1: ARM: Convert clps7500 to generic irq handling
[ARM] 3687/1: ARM: Convert integrator to generic irq handling
[ARM] 3685/1: ARM: Convert pxa to generic irq handling
[ARM] 3684/1: ARM: Convert l7200 to generic irq handling
[ARM] 3681/1: ARM: Convert ixp2000 to generic irq handling
[ARM] 3680/1: ARM: Convert footbridge to generic irq handling
[ARM] 3695/1: ARM drivers/pcmcia: Fixup includes
[ARM] 3689/1: ARM drivers/input/touchscreen: Fixup includes
...
Manual conflict resolved in kernel/irq/handle.c (butt-ugly ARM tickless
code).
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/dyntick.h | 6 | ||||
-rw-r--r-- | include/asm-arm/hw_irq.h | 9 | ||||
-rw-r--r-- | include/asm-arm/irq.h | 22 | ||||
-rw-r--r-- | include/asm-arm/mach/irq.h | 135 | ||||
-rw-r--r-- | include/linux/irq.h | 3 |
5 files changed, 56 insertions, 119 deletions
diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h new file mode 100644 index 000000000000..19fab2d2b760 --- /dev/null +++ b/include/asm-arm/dyntick.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASMARM_DYNTICK_H | ||
2 | #define _ASMARM_DYNTICK_H | ||
3 | |||
4 | #include <asm/mach/time.h> | ||
5 | |||
6 | #endif /* _ASMARM_DYNTICK_H */ | ||
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h new file mode 100644 index 000000000000..f1a08a500604 --- /dev/null +++ b/include/asm-arm/hw_irq.h | |||
@@ -0,0 +1,9 @@ | |||
1 | /* | ||
2 | * Nothing to see here yet | ||
3 | */ | ||
4 | #ifndef _ARCH_ARM_HW_IRQ_H | ||
5 | #define _ARCH_ARM_HW_IRQ_H | ||
6 | |||
7 | #include <asm/mach/irq.h> | ||
8 | |||
9 | #endif | ||
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 66e67e60bc56..283af50a16cb 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -21,18 +21,13 @@ | |||
21 | 21 | ||
22 | struct irqaction; | 22 | struct irqaction; |
23 | 23 | ||
24 | extern void disable_irq_nosync(unsigned int); | ||
25 | extern void disable_irq(unsigned int); | ||
26 | extern void enable_irq(unsigned int); | ||
27 | |||
28 | /* | 24 | /* |
29 | * These correspond with the SA_TRIGGER_* defines, and therefore the | 25 | * Migration helpers |
30 | * IORESOURCE_IRQ_* defines. | ||
31 | */ | 26 | */ |
32 | #define __IRQT_RISEDGE (1 << 0) | 27 | #define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING |
33 | #define __IRQT_FALEDGE (1 << 1) | 28 | #define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING |
34 | #define __IRQT_HIGHLVL (1 << 2) | 29 | #define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW |
35 | #define __IRQT_LOWLVL (1 << 3) | 30 | #define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH |
36 | 31 | ||
37 | #define IRQT_NOEDGE (0) | 32 | #define IRQT_NOEDGE (0) |
38 | #define IRQT_RISING (__IRQT_RISEDGE) | 33 | #define IRQT_RISING (__IRQT_RISEDGE) |
@@ -40,12 +35,7 @@ extern void enable_irq(unsigned int); | |||
40 | #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) | 35 | #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) |
41 | #define IRQT_LOW (__IRQT_LOWLVL) | 36 | #define IRQT_LOW (__IRQT_LOWLVL) |
42 | #define IRQT_HIGH (__IRQT_HIGHLVL) | 37 | #define IRQT_HIGH (__IRQT_HIGHLVL) |
43 | #define IRQT_PROBE (1 << 4) | 38 | #define IRQT_PROBE IRQ_TYPE_PROBE |
44 | |||
45 | int set_irq_type(unsigned int irq, unsigned int type); | ||
46 | void disable_irq_wake(unsigned int irq); | ||
47 | void enable_irq_wake(unsigned int irq); | ||
48 | int setup_irq(unsigned int, struct irqaction *); | ||
49 | 39 | ||
50 | extern void migrate_irqs(void); | 40 | extern void migrate_irqs(void); |
51 | #endif | 41 | #endif |
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index d4d420ecf3a8..131f33733d25 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h | |||
@@ -10,95 +10,9 @@ | |||
10 | #ifndef __ASM_ARM_MACH_IRQ_H | 10 | #ifndef __ASM_ARM_MACH_IRQ_H |
11 | #define __ASM_ARM_MACH_IRQ_H | 11 | #define __ASM_ARM_MACH_IRQ_H |
12 | 12 | ||
13 | struct irqdesc; | 13 | #include <linux/irq.h> |
14 | struct pt_regs; | ||
15 | struct seq_file; | ||
16 | |||
17 | typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *); | ||
18 | typedef void (*irq_control_t)(unsigned int); | ||
19 | |||
20 | struct irqchip { | ||
21 | /* | ||
22 | * Acknowledge the IRQ. | ||
23 | * If this is a level-based IRQ, then it is expected to mask the IRQ | ||
24 | * as well. | ||
25 | */ | ||
26 | void (*ack)(unsigned int); | ||
27 | /* | ||
28 | * Mask the IRQ in hardware. | ||
29 | */ | ||
30 | void (*mask)(unsigned int); | ||
31 | /* | ||
32 | * Unmask the IRQ in hardware. | ||
33 | */ | ||
34 | void (*unmask)(unsigned int); | ||
35 | /* | ||
36 | * Ask the hardware to re-trigger the IRQ. | ||
37 | * Note: This method _must_ _not_ call the interrupt handler. | ||
38 | * If you are unable to retrigger the interrupt, do not | ||
39 | * provide a function, or if you do, return non-zero. | ||
40 | */ | ||
41 | int (*retrigger)(unsigned int); | ||
42 | /* | ||
43 | * Set the type of the IRQ. | ||
44 | */ | ||
45 | int (*set_type)(unsigned int, unsigned int); | ||
46 | /* | ||
47 | * Set wakeup-enable on the selected IRQ | ||
48 | */ | ||
49 | int (*set_wake)(unsigned int, unsigned int); | ||
50 | |||
51 | #ifdef CONFIG_SMP | ||
52 | /* | ||
53 | * Route an interrupt to a CPU | ||
54 | */ | ||
55 | void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu); | ||
56 | #endif | ||
57 | }; | ||
58 | |||
59 | struct irqdesc { | ||
60 | irq_handler_t handle; | ||
61 | struct irqchip *chip; | ||
62 | struct irqaction *action; | ||
63 | struct list_head pend; | ||
64 | void __iomem *base; | ||
65 | void *data; | ||
66 | unsigned int disable_depth; | ||
67 | |||
68 | unsigned int triggered: 1; /* IRQ has occurred */ | ||
69 | unsigned int running : 1; /* IRQ is running */ | ||
70 | unsigned int pending : 1; /* IRQ is pending */ | ||
71 | unsigned int probing : 1; /* IRQ in use for a probe */ | ||
72 | unsigned int probe_ok : 1; /* IRQ can be used for probe */ | ||
73 | unsigned int valid : 1; /* IRQ claimable */ | ||
74 | unsigned int noautoenable : 1; /* don't automatically enable IRQ */ | ||
75 | unsigned int unused :25; | ||
76 | |||
77 | unsigned int irqs_unhandled; | ||
78 | struct proc_dir_entry *procdir; | ||
79 | |||
80 | #ifdef CONFIG_SMP | ||
81 | cpumask_t affinity; | ||
82 | unsigned int cpu; | ||
83 | #endif | ||
84 | |||
85 | /* | ||
86 | * IRQ lock detection | ||
87 | */ | ||
88 | unsigned int lck_cnt; | ||
89 | unsigned int lck_pc; | ||
90 | unsigned int lck_jif; | ||
91 | }; | ||
92 | |||
93 | extern struct irqdesc irq_desc[]; | ||
94 | 14 | ||
95 | /* | 15 | struct seq_file; |
96 | * Helpful inline function for calling irq descriptor handlers. | ||
97 | */ | ||
98 | static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
99 | { | ||
100 | desc->handle(irq, desc, regs); | ||
101 | } | ||
102 | 16 | ||
103 | /* | 17 | /* |
104 | * This is internal. Do not use it. | 18 | * This is internal. Do not use it. |
@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc | |||
106 | extern void (*init_arch_irq)(void); | 20 | extern void (*init_arch_irq)(void); |
107 | extern void init_FIQ(void); | 21 | extern void init_FIQ(void); |
108 | extern int show_fiq_list(struct seq_file *, void *); | 22 | extern int show_fiq_list(struct seq_file *, void *); |
109 | void __set_irq_handler(unsigned int irq, irq_handler_t, int); | ||
110 | 23 | ||
111 | /* | 24 | /* |
112 | * External stuff. | 25 | * Function wrappers |
26 | */ | ||
27 | #define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d) | ||
28 | #define get_irq_chipdata(irq) get_irq_chip_data(irq) | ||
29 | |||
30 | /* | ||
31 | * Obsolete inline function for calling irq descriptor handlers. | ||
113 | */ | 32 | */ |
114 | #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) | 33 | static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc, |
115 | #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) | 34 | struct pt_regs *regs) |
116 | #define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) | 35 | { |
117 | #define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) | 36 | desc->handle_irq(irq, desc, regs); |
118 | #define get_irq_chipdata(irq) (irq_desc[irq].base) | 37 | } |
119 | 38 | ||
120 | void set_irq_chip(unsigned int irq, struct irqchip *); | ||
121 | void set_irq_flags(unsigned int irq, unsigned int flags); | 39 | void set_irq_flags(unsigned int irq, unsigned int flags); |
122 | 40 | ||
123 | #define IRQF_VALID (1 << 0) | 41 | #define IRQF_VALID (1 << 0) |
@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags); | |||
125 | #define IRQF_NOAUTOEN (1 << 2) | 43 | #define IRQF_NOAUTOEN (1 << 2) |
126 | 44 | ||
127 | /* | 45 | /* |
128 | * Built-in IRQ handlers. | 46 | * This is for easy migration, but should be changed in the source |
129 | */ | 47 | */ |
130 | void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 48 | #define do_level_IRQ handle_level_irq |
131 | void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 49 | #define do_edge_IRQ handle_edge_irq |
132 | void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 50 | #define do_simple_IRQ handle_simple_irq |
133 | void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 51 | #define irqdesc irq_desc |
134 | void dummy_mask_unmask_irq(unsigned int irq); | 52 | #define irqchip irq_chip |
53 | |||
54 | #define do_bad_IRQ(irq,desc,regs) \ | ||
55 | do { \ | ||
56 | spin_lock(&desc->lock); \ | ||
57 | handle_bad_irq(irq, desc, regs); \ | ||
58 | spin_unlock(&desc->lock); \ | ||
59 | } while(0) | ||
60 | |||
61 | extern unsigned long irq_err_count; | ||
62 | static inline void ack_bad_irq(int irq) | ||
63 | { | ||
64 | irq_err_count++; | ||
65 | } | ||
135 | 66 | ||
136 | #endif | 67 | #endif |
diff --git a/include/linux/irq.h b/include/linux/irq.h index ae1e422f18e3..95d7aa7954d2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -347,8 +347,9 @@ extern int noirqdebug_setup(char *str); | |||
347 | /* Checks whether the interrupt can be requested by request_irq(): */ | 347 | /* Checks whether the interrupt can be requested by request_irq(): */ |
348 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); | 348 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); |
349 | 349 | ||
350 | /* Dummy irq-chip implementation: */ | 350 | /* Dummy irq-chip implementations: */ |
351 | extern struct irq_chip no_irq_chip; | 351 | extern struct irq_chip no_irq_chip; |
352 | extern struct irq_chip dummy_irq_chip; | ||
352 | 353 | ||
353 | extern void | 354 | extern void |
354 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 355 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, |