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>
This commit is contained in:
Родитель
09accc3a05
Коммит
6b3788e5fb
|
@ -68,9 +68,9 @@ static void intc_irq_mask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
unsigned int irq = d->irq - MCFINT_VECBASE;
|
unsigned int irq = d->irq - MCFINT_VECBASE;
|
||||||
|
|
||||||
if (MCFINTC2_SIMR && (irq > 128))
|
if (MCFINTC2_SIMR && (irq > 127))
|
||||||
__raw_writeb(irq - 128, MCFINTC2_SIMR);
|
__raw_writeb(irq - 128, MCFINTC2_SIMR);
|
||||||
else if (MCFINTC1_SIMR && (irq > 64))
|
else if (MCFINTC1_SIMR && (irq > 63))
|
||||||
__raw_writeb(irq - 64, MCFINTC1_SIMR);
|
__raw_writeb(irq - 64, MCFINTC1_SIMR);
|
||||||
else
|
else
|
||||||
__raw_writeb(irq, MCFINTC0_SIMR);
|
__raw_writeb(irq, MCFINTC0_SIMR);
|
||||||
|
@ -80,9 +80,9 @@ static void intc_irq_unmask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
unsigned int irq = d->irq - MCFINT_VECBASE;
|
unsigned int irq = d->irq - MCFINT_VECBASE;
|
||||||
|
|
||||||
if (MCFINTC2_CIMR && (irq > 128))
|
if (MCFINTC2_CIMR && (irq > 127))
|
||||||
__raw_writeb(irq - 128, MCFINTC2_CIMR);
|
__raw_writeb(irq - 128, MCFINTC2_CIMR);
|
||||||
else if (MCFINTC1_CIMR && (irq > 64))
|
else if (MCFINTC1_CIMR && (irq > 63))
|
||||||
__raw_writeb(irq - 64, MCFINTC1_CIMR);
|
__raw_writeb(irq - 64, MCFINTC1_CIMR);
|
||||||
else
|
else
|
||||||
__raw_writeb(irq, MCFINTC0_CIMR);
|
__raw_writeb(irq, MCFINTC0_CIMR);
|
||||||
|
@ -115,9 +115,9 @@ static unsigned int intc_irq_startup(struct irq_data *d)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq -= MCFINT_VECBASE;
|
irq -= MCFINT_VECBASE;
|
||||||
if (MCFINTC2_ICR0 && (irq > 128))
|
if (MCFINTC2_ICR0 && (irq > 127))
|
||||||
__raw_writeb(5, MCFINTC2_ICR0 + irq - 128);
|
__raw_writeb(5, MCFINTC2_ICR0 + irq - 128);
|
||||||
else if (MCFINTC1_ICR0 && (irq > 64))
|
else if (MCFINTC1_ICR0 && (irq > 63))
|
||||||
__raw_writeb(5, MCFINTC1_ICR0 + irq - 64);
|
__raw_writeb(5, MCFINTC1_ICR0 + irq - 64);
|
||||||
else
|
else
|
||||||
__raw_writeb(5, MCFINTC0_ICR0 + irq);
|
__raw_writeb(5, MCFINTC0_ICR0 + irq);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче