aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-06-29 05:24:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 13:26:24 -0400
commit94d39e1f6e8132ea982a1d61acbe0423d3d14365 (patch)
tree68ba3666c1d2c0805089e8ffdb47da961a760450
parent6550c775cb5ee94c132d93d84de3bb23f0abf37b (diff)
[PATCH] genirq: add IRQ_NOAUTOEN support
Enable platforms to disable the automatic enabling of freshly set up irqs. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/irq.h1
-rw-r--r--kernel/irq/handle.c1
-rw-r--r--kernel/irq/manage.c18
3 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 1df49ec7f820..14d7e94048dd 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -42,6 +42,7 @@
42 42
43#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ 43#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
44#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ 44#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
45#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */
45/** 46/**
46 * struct hw_interrupt_type - hardware interrupt type descriptor 47 * struct hw_interrupt_type - hardware interrupt type descriptor
47 * 48 *
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 402fa3aec1e4..9b398d52f1b7 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -32,6 +32,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
32 [0 ... NR_IRQS-1] = { 32 [0 ... NR_IRQS-1] = {
33 .status = IRQ_DISABLED, 33 .status = IRQ_DISABLED,
34 .chip = &no_irq_type, 34 .chip = &no_irq_type,
35 .depth = 1,
35 .lock = SPIN_LOCK_UNLOCKED, 36 .lock = SPIN_LOCK_UNLOCKED,
36#ifdef CONFIG_SMP 37#ifdef CONFIG_SMP
37 .affinity = CPU_MASK_ALL 38 .affinity = CPU_MASK_ALL
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index cae900a849c4..9ea18879fb62 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -216,13 +216,17 @@ int setup_irq(unsigned int irq, struct irqaction *new)
216 desc->status |= IRQ_PER_CPU; 216 desc->status |= IRQ_PER_CPU;
217#endif 217#endif
218 if (!shared) { 218 if (!shared) {
219 desc->depth = 0; 219 desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING |
220 desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | 220 IRQ_INPROGRESS);
221 IRQ_WAITING | IRQ_INPROGRESS); 221
222 if (desc->chip->startup) 222 if (!(desc->status & IRQ_NOAUTOEN)) {
223 desc->chip->startup(irq); 223 desc->depth = 0;
224 else 224 desc->status &= ~IRQ_DISABLED;
225 desc->chip->enable(irq); 225 if (desc->chip->startup)
226 desc->chip->startup(irq);
227 else
228 desc->chip->enable(irq);
229 }
226 } 230 }
227 spin_unlock_irqrestore(&desc->lock, flags); 231 spin_unlock_irqrestore(&desc->lock, flags);
228 232