Skip to content

Commit

Permalink
DMA: PL330: Register the DMA controller with the generic DMA helpers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Padmavathi Venna authored and Vinod Koul committed Feb 14, 2013
1 parent a80258f commit 421da89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/dma/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -2995,6 +2995,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pi->pcfg.data_bus_width / 8, pi->pcfg.num_chan,
pi->pcfg.num_peri, pi->pcfg.num_events);

ret = of_dma_controller_register(adev->dev.of_node,
of_dma_pl330_xlate, pdmac);
if (ret) {
dev_err(&adev->dev,
"unable to register DMA to the generic DT DMA helpers\n");
goto probe_err2;
}

return 0;

probe_err2:
Expand All @@ -3015,6 +3023,8 @@ static int __devexit pl330_remove(struct amba_device *adev)
if (!pdmac)
return 0;

of_dma_controller_free(adev->dev.of_node);

amba_set_drvdata(adev, NULL);

/* Idle the DMAC */
Expand Down

0 comments on commit 421da89

Please sign in to comment.