Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Alchemy: devboards: remove unneeded BCSR IRQ reg acc

Initially I had to write to both the MASK and ENABLE registers, otherwise
the CPLD would generate tons of spurious interrupts. With the change to
the demux handler to disable the muxed line, it is now sufficient to
disable the interrupt by writing either the enable or mask register.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2865/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Manuel Lauss and committed by
Ralf Baechle
fb469f08 435037c6

+2 -9
+2 -9
arch/mips/alchemy/devboards/bcsr.c
··· 97 97 enable_irq(irq); 98 98 } 99 99 100 - /* NOTE: both the enable and mask bits must be cleared, otherwise the 101 - * CPLD generates tons of spurious interrupts (at least on my DB1200). 102 - * -- mlau 103 - */ 104 100 static void bcsr_irq_mask(struct irq_data *d) 105 101 { 106 102 unsigned short v = 1 << (d->irq - bcsr_csc_base); 107 - __raw_writew(v, bcsr_virt + BCSR_REG_INTCLR); 108 103 __raw_writew(v, bcsr_virt + BCSR_REG_MASKCLR); 109 104 wmb(); 110 105 } ··· 107 112 static void bcsr_irq_maskack(struct irq_data *d) 108 113 { 109 114 unsigned short v = 1 << (d->irq - bcsr_csc_base); 110 - __raw_writew(v, bcsr_virt + BCSR_REG_INTCLR); 111 115 __raw_writew(v, bcsr_virt + BCSR_REG_MASKCLR); 112 116 __raw_writew(v, bcsr_virt + BCSR_REG_INTSTAT); /* ack */ 113 117 wmb(); ··· 115 121 static void bcsr_irq_unmask(struct irq_data *d) 116 122 { 117 123 unsigned short v = 1 << (d->irq - bcsr_csc_base); 118 - __raw_writew(v, bcsr_virt + BCSR_REG_INTSET); 119 124 __raw_writew(v, bcsr_virt + BCSR_REG_MASKSET); 120 125 wmb(); 121 126 } ··· 130 137 { 131 138 unsigned int irq; 132 139 133 - /* mask & disable & ack all */ 134 - __raw_writew(0xffff, bcsr_virt + BCSR_REG_INTCLR); 140 + /* mask & enable & ack all */ 135 141 __raw_writew(0xffff, bcsr_virt + BCSR_REG_MASKCLR); 142 + __raw_writew(0xffff, bcsr_virt + BCSR_REG_INTSET); 136 143 __raw_writew(0xffff, bcsr_virt + BCSR_REG_INTSTAT); 137 144 wmb(); 138 145