Commit ac1e7b88 authored by Deepak Saxena's avatar Deepak Saxena Committed by Russell King

[ARM PATCH] 2259/1: Rip out ixp2000 IRQ_ERR_STATUS demultiplexing

Patch from Lennert Buytenhek
  
There are thirteen different IRQs chained off IRQ_ERR_STATUS, one for
each possible error class that the IXP can signal an interrupt for, but
there are no in-tree users of these interrupts, and it doesn't make much
sense to treat them as separate interrupts if we can just have one
handler checking each of the thirteen errors in one go instead.
  
Besides that, the error interrupt handling can't even have been working
properly in the first place as the chained handler was testing the wrong
bits in the IRQ_ERR_STATUS register.
  
So this patch rips it all out.
  

Signed-off-by: Lennert Buytenhek
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King
parent 9ddd6ad2
...@@ -309,41 +309,6 @@ static struct irqchip ixp2000_pci_irq_chip = { ...@@ -309,41 +309,6 @@ static struct irqchip ixp2000_pci_irq_chip = {
.unmask = ixp2000_pci_irq_unmask .unmask = ixp2000_pci_irq_unmask
}; };
/*
* Error interrupts. These are used extensively by the microengine drivers
*/
static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
{
int i;
unsigned long status = *IXP2000_IRQ_ERR_STATUS;
for (i = 0; i <= 12; i++) {
if (status & (1 << i)) {
desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i;
desc->handle(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs);
}
}
}
static void ixp2000_err_irq_mask(unsigned int irq)
{
ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR,
(1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
}
static void ixp2000_err_irq_unmask(unsigned int irq)
{
ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET,
(1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)));
}
static struct irqchip ixp2000_err_irq_chip = {
.ack = ixp2000_err_irq_mask,
.mask = ixp2000_err_irq_mask,
.unmask = ixp2000_err_irq_unmask
};
static void ixp2000_irq_mask(unsigned int irq) static void ixp2000_irq_mask(unsigned int irq)
{ {
ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, (1 << irq)); ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, (1 << irq));
...@@ -415,12 +380,5 @@ void __init ixp2000_init_irq(void) ...@@ -415,12 +380,5 @@ void __init ixp2000_init_irq(void)
set_irq_handler(irq, do_level_IRQ); set_irq_handler(irq, do_level_IRQ);
set_irq_flags(irq, IRQF_VALID); set_irq_flags(irq, IRQF_VALID);
} }
for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) {
set_irq_chip(irq, &ixp2000_err_irq_chip);
set_irq_handler(irq, do_level_IRQ);
set_irq_flags(irq, IRQF_VALID);
}
set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler);
} }
...@@ -67,22 +67,7 @@ ...@@ -67,22 +67,7 @@
#define IRQ_IXP2000_PCIA 40 #define IRQ_IXP2000_PCIA 40
#define IRQ_IXP2000_PCIB 41 #define IRQ_IXP2000_PCIB 41
/* Int sources from IRQ_ERROR_STATUS */ #define NR_IXP2000_IRQS 42
#define IRQ_IXP2000_DRAM0_MIN_ERR 42
#define IRQ_IXP2000_DRAM0_MAJ_ERR 43
#define IRQ_IXP2000_DRAM1_MIN_ERR 44
#define IRQ_IXP2000_DRAM1_MAJ_ERR 45
#define IRQ_IXP2000_DRAM2_MIN_ERR 46
#define IRQ_IXP2000_DRAM2_MAJ_ERR 47
#define IRQ_IXP2000_SRAM0_ERR 48
#define IRQ_IXP2000_SRAM1_ERR 49
#define IRQ_IXP2000_SRAM2_ERR 50
#define IRQ_IXP2000_SRAM3_ERR 51
#define IRQ_IXP2000_MEDIA_ERR 52
#define IRQ_IXP2000_PCI_ERR 53
#define IRQ_IXP2000_SP_INT 54
#define NR_IXP2000_IRQS 55
#define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment