[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>
This commit is contained in:
parent
6550c775cb
commit
94d39e1f6e
3 changed files with 13 additions and 7 deletions
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
|
#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */
|
||||||
#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
|
#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */
|
||||||
|
#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */
|
||||||
/**
|
/**
|
||||||
* struct hw_interrupt_type - hardware interrupt type descriptor
|
* struct hw_interrupt_type - hardware interrupt type descriptor
|
||||||
*
|
*
|
||||||
|
|
|
@ -32,6 +32,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
|
||||||
[0 ... NR_IRQS-1] = {
|
[0 ... NR_IRQS-1] = {
|
||||||
.status = IRQ_DISABLED,
|
.status = IRQ_DISABLED,
|
||||||
.chip = &no_irq_type,
|
.chip = &no_irq_type,
|
||||||
|
.depth = 1,
|
||||||
.lock = SPIN_LOCK_UNLOCKED,
|
.lock = SPIN_LOCK_UNLOCKED,
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
.affinity = CPU_MASK_ALL
|
.affinity = CPU_MASK_ALL
|
||||||
|
|
|
@ -216,13 +216,17 @@ int setup_irq(unsigned int irq, struct irqaction *new)
|
||||||
desc->status |= IRQ_PER_CPU;
|
desc->status |= IRQ_PER_CPU;
|
||||||
#endif
|
#endif
|
||||||
if (!shared) {
|
if (!shared) {
|
||||||
desc->depth = 0;
|
desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING |
|
||||||
desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT |
|
IRQ_INPROGRESS);
|
||||||
IRQ_WAITING | IRQ_INPROGRESS);
|
|
||||||
if (desc->chip->startup)
|
if (!(desc->status & IRQ_NOAUTOEN)) {
|
||||||
desc->chip->startup(irq);
|
desc->depth = 0;
|
||||||
else
|
desc->status &= ~IRQ_DISABLED;
|
||||||
desc->chip->enable(irq);
|
if (desc->chip->startup)
|
||||||
|
desc->chip->startup(irq);
|
||||||
|
else
|
||||||
|
desc->chip->enable(irq);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&desc->lock, flags);
|
spin_unlock_irqrestore(&desc->lock, flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue