diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-09-30 10:50:48 +0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-10-13 20:06:22 +0400 |
commit | e98b3cafe5f048be40ff6acb18dfa7c9a0e9423e (patch) | |
tree | 65b908bef1949539300861be0f52936206be07f6 /drivers/dma/pl330.c | |
parent | 20a90b0ebca434421c30de5ca6b1979ca02e52bf (diff) | |
download | linux-e98b3cafe5f048be40ff6acb18dfa7c9a0e9423e.tar.xz |
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: Michal Simek <michal.simek@xilinx.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 58623dc474d1..96de393aaf4f 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -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); |