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

m68k: coldfire: fix irq ranges

Working on flexcan0, there was no way to have irq 128 working.
Fix irq 128 and 196 setup.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

authored by

Angelo Dureghello and committed by
Greg Ungerer
6b3788e5 09accc3a

+6 -6
+6 -6
arch/m68k/coldfire/intc-simr.c
··· 68 68 { 69 69 unsigned int irq = d->irq - MCFINT_VECBASE; 70 70 71 - if (MCFINTC2_SIMR && (irq > 128)) 71 + if (MCFINTC2_SIMR && (irq > 127)) 72 72 __raw_writeb(irq - 128, MCFINTC2_SIMR); 73 - else if (MCFINTC1_SIMR && (irq > 64)) 73 + else if (MCFINTC1_SIMR && (irq > 63)) 74 74 __raw_writeb(irq - 64, MCFINTC1_SIMR); 75 75 else 76 76 __raw_writeb(irq, MCFINTC0_SIMR); ··· 80 80 { 81 81 unsigned int irq = d->irq - MCFINT_VECBASE; 82 82 83 - if (MCFINTC2_CIMR && (irq > 128)) 83 + if (MCFINTC2_CIMR && (irq > 127)) 84 84 __raw_writeb(irq - 128, MCFINTC2_CIMR); 85 - else if (MCFINTC1_CIMR && (irq > 64)) 85 + else if (MCFINTC1_CIMR && (irq > 63)) 86 86 __raw_writeb(irq - 64, MCFINTC1_CIMR); 87 87 else 88 88 __raw_writeb(irq, MCFINTC0_CIMR); ··· 115 115 } 116 116 117 117 irq -= MCFINT_VECBASE; 118 - if (MCFINTC2_ICR0 && (irq > 128)) 118 + if (MCFINTC2_ICR0 && (irq > 127)) 119 119 __raw_writeb(5, MCFINTC2_ICR0 + irq - 128); 120 - else if (MCFINTC1_ICR0 && (irq > 64)) 120 + else if (MCFINTC1_ICR0 && (irq > 63)) 121 121 __raw_writeb(5, MCFINTC1_ICR0 + irq - 64); 122 122 else 123 123 __raw_writeb(5, MCFINTC0_ICR0 + irq);