[PATCH] powerpc/fsl_msi: Handle msi-available-ranges better

Scott Wood scottwood at freescale.com
Wed Sep 14 04:33:06 EST 2011


On 09/07/2011 11:20 AM, Tabi Timur-B04825 wrote:
> The problem is that both offset and irq_index are being incremented in
> the loop, and cascade_data->index is set to the sum of the two.
> 
> Perhaps you meant this:
> 
> 		err = fsl_msi_setup_hwirq(msi, dev, offset, j);

That's not right either, it would retrieve the wrong IRQ from the
interrupts property if you have holes -- try with something like
{ 0 64, 128, 64 }.  The desired behavior there is:

  offset = 0 irq_index = 0
  offset = 1 irq_index = 1
  offset = 4 irq_index = 2
  offset = 5 irq_index = 3

I think the right code (untested) might be:

	err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);

and

	cascade_data->index = offset;

-Scott



More information about the devicetree-discuss mailing list