LEON3: add support for IRQ16..31 for CPU!=0

This commit is contained in:
Daniel Hellstrom
2014-05-19 22:52:18 +02:00
parent 5b45d51a59
commit 3a76d83098

View File

@@ -132,11 +132,12 @@ extern int LEON3_IrqCtrl_EIrq;
static __inline__ int bsp_irq_fixup(int irq)
{
int eirq;
int eirq, cpu;
if (LEON3_IrqCtrl_EIrq != 0 && irq == LEON3_IrqCtrl_EIrq) {
/* Get interrupt number from IRQ controller */
eirq = LEON3_IrqCtrl_Regs->intid[LEON3_Cpu_Index] & 0x1f;
cpu = _LEON3_Get_current_processor();
eirq = LEON3_IrqCtrl_Regs->intid[cpu] & 0x1f;
if (eirq & 0x10)
irq = eirq;
}