From 0a154139cd5ad04a18e4efc1cd0656641869a518 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 30 Sep 2013 08:50:48 +0200 Subject: 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 Tested-by: Lars-Peter Clausen Signed-off-by: Vinod Koul (cherry picked from commit e98b3cafe5f048be40ff6acb18dfa7c9a0e9423e) Signed-off-by: Jon Medhurst --- drivers/dma/pl330.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 98a79a7bca52..8058d35aebda 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2926,11 +2926,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); -- cgit v1.2.3