aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPadmavathi Venna <padma.v@samsung.com>2013-02-13 22:40:07 -0500
committerVinod Koul <vinod.koul@intel.com>2013-02-14 09:34:27 -0500
commit421da89aadd1b24f4a3bc1d60c9de9825ec2debc (patch)
tree6819535a892530a23d7ab4ed347fff491e4e3103
parenta80258f9b2ac81e72ff680d273df9544a1307a32 (diff)
DMA: PL330: Register the DMA controller with the generic DMA helpers
This patch registers the pl330 dma controller driver with the generic device tree dma helper functions. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/pl330.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index f5d47e617df2..fc9c80017378 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2995,6 +2995,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
2995 pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan, 2995 pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan,
2996 pi->pcfg.num_peri, pi->pcfg.num_events); 2996 pi->pcfg.num_peri, pi->pcfg.num_events);
2997 2997
2998 ret = of_dma_controller_register(adev->dev.of_node,
2999 of_dma_pl330_xlate, pdmac);
3000 if (ret) {
3001 dev_err(&adev->dev,
3002 "unable to register DMA to the generic DT DMA helpers\n");
3003 goto probe_err2;
3004 }
3005
2998 return 0; 3006 return 0;
2999 3007
3000probe_err2: 3008probe_err2:
@@ -3015,6 +3023,8 @@ static int __devexit pl330_remove(struct amba_device *adev)
3015 if (!pdmac) 3023 if (!pdmac)
3016 return 0; 3024 return 0;
3017 3025
3026 of_dma_controller_free(adev->dev.of_node);
3027
3018 amba_set_drvdata(adev, NULL); 3028 amba_set_drvdata(adev, NULL);
3019 3029
3020 /* Idle the DMAC */ 3030 /* Idle the DMAC */