Cascade Interrupt Help!!!

Hi,

I posted this in the general Help forum. thought this is a more appropriate place.

we are using MPC 8641 boards running QNX 6.4. We have an interrupt line connected to another chip. There is a interrupt source register on the the chip that tells us what the interrupt is.

The current code, which works fine, is to configure the primary interrupt on the mpc8641, and a cascade interrupt off the interrupt line that connects to the chip as follows:

/* 8641D CPU interrupts /
{ PPC_INTR_CLASS_86xx, 84, _NTO_INTR_SPARE,
PPC_EXC_EXTERNAL_INTR, 0, 0,
{INTR_GENFLAG_LOAD_SYSPAGE | INTR_GENFLAG_LOAD_CPUNUM, 0,
&interrupt_id_mpc86xx},
{INTR_GENFLAG_LOAD_CPUNUM, 0, &interrupt_eoi_mpc86xx},
&interrupt_mask_mpc86xx,
&interrupt_unmask_mpc86xx,
&interrupt_config_mpc86xx,
&immr_paddr,
},
/
chip interrupt is connected to IRQ0 */
{ CHIP_INTR_OFFSET, 32, PPC86xx_INTR_IRQ0,
PPC_EXC_EXTERNAL_INTR, 0, 0,
{INTR_GENFLAG_LOAD_CPUNUM, 0, &interrupt_id_chip},
{INTR_GENFLAG_LOAD_CPUNUM, 0, &interrupt_eoi_chip},
&interrupt_mask_chip,
&interrupt_unmask_chip,
0, &chip_paddr,
},

The issue, now, is that on one of the interrupt on the chip, I want to have some special code to handle it. Thus, I want to create a cascade interrupt for that special interrupt. Is this feasible? How?

The above code is written by someone else. I have some general idea how the callout and patching works. However, I’m not sure how the order in which the parent and child callouts are called, and what the return values for the parent and child callout should be.

thanks,
-Charles