Commit e98b3caf authored by Michal Simek's avatar Michal Simek Committed by Vinod Koul

dma: pl330: Support per channel irq allocation

Some pl330 have per channel irq and it is necessary
to allocate all of them. Loop over irq assigned for this
device to support these pl330 IPs.

For example this IP is available on Xilinx Zynq platform.
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Tested-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 20a90b0e
......@@ -2922,11 +2922,18 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
amba_set_drvdata(adev, pdmac);
irq = adev->irq[0];
ret = devm_request_irq(&adev->dev, irq, pl330_irq_handler, 0,
dev_name(&adev->dev), pi);
if (ret)
return ret;
for (i = 0; i <= AMBA_NR_IRQS; i++) {
irq = adev->irq[i];
if (irq) {
ret = devm_request_irq(&adev->dev, irq,
pl330_irq_handler, 0,
dev_name(&adev->dev), pi);
if (ret)
return ret;
} else {
break;
}
}
pi->pcfg.periph_id = adev->periphid;
ret = pl330_add(pi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment