From 4628a32976de9b6f8c9670515abf222b5dc18c36 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 22 Mar 2015 08:41:54 -0600 Subject: [PATCH] PIC32MZ: Correct conversion of IRQ nubmers to IRSx register addresses. From Kristopher Tate --- arch/mips/src/pic32mz/pic32mz-irq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/src/pic32mz/pic32mz-irq.c b/arch/mips/src/pic32mz/pic32mz-irq.c index 82283976f6..ea489a238a 100644 --- a/arch/mips/src/pic32mz/pic32mz-irq.c +++ b/arch/mips/src/pic32mz/pic32mz-irq.c @@ -101,7 +101,7 @@ static uintptr_t pic32mz_ifs(int irq) { if ((unsigned)irq < NR_IRQS) { - return PIC32MZ_INT_IFS(irq); + return PIC32MZ_INT_IFS(irq >> 5); } return 0; @@ -115,7 +115,7 @@ static uintptr_t pic32mz_ifsclr(int irq) { if ((unsigned)irq < NR_IRQS) { - return PIC32MZ_INT_IFSCLR(irq); + return PIC32MZ_INT_IFSCLR(irq >> 5); } return 0; @@ -129,7 +129,7 @@ static uintptr_t pic32mz_iec(int irq) { if ((unsigned)irq < NR_IRQS) { - return PIC32MZ_INT_IEC(irq); + return PIC32MZ_INT_IEC(irq >> 5); } return 0; @@ -143,7 +143,7 @@ static uintptr_t pic32mz_iecset(int irq) { if ((unsigned)irq < NR_IRQS) { - return PIC32MZ_INT_IECSET(irq); + return PIC32MZ_INT_IECSET(irq >> 5); } return 0; @@ -157,7 +157,7 @@ static uintptr_t pic32mz_iecclr(int irq) { if ((unsigned)irq < NR_IRQS) { - return PIC32MZ_INT_IECCLR(irq); + return PIC32MZ_INT_IECCLR(irq >> 5); } return 0;