summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-04-18 16:35:41 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:43:23 -0800
commit6dc0b6f14e0486e66aa3df5b14d94010e07a52e5 (patch)
treefdbb6cc17c3a7fea8e67040f04e0197c79781a04 /drivers/spi
parente0eb8e1b0d9e6bd20e6c6b6b136a98db728730e7 (diff)
arm: tegra: dma: Adding client name with dma allocation.
By changing the dma allocation API to take the client name, it is easy to track who is allocated the DMA channels when we run out of the DMA channels. Original-Change-Id: I016011cfd74089fed0da1bc0f121800017ce124a Reviewed-on: http://git-master/r/28031 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Original-Change-Id: I048bcb87f95ee6d8ad2fdce993a1758dc5071666 Rebase-Id: R29b9645ecbe209f571018c6e707bfdd9cd65ad5d
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-tegra.c6
-rw-r--r--drivers/spi/spi_slave_tegra.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c
index 4d80e8316aa1..ae8762050f1f 100644
--- a/drivers/spi/spi-tegra.c
+++ b/drivers/spi/spi-tegra.c
@@ -1126,7 +1126,8 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
init_completion(&tspi->rx_dma_complete);
- tspi->rx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
+ tspi->rx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT,
+ "spi_rx_%d", pdev->id);
if (!tspi->rx_dma) {
dev_err(&pdev->dev, "can not allocate rx dma channel\n");
ret = -ENODEV;
@@ -1154,7 +1155,8 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
tspi->rx_dma_req.req_sel = spi_tegra_req_sels[pdev->id];
tspi->rx_dma_req.dev = tspi;
- tspi->tx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
+ tspi->tx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT,
+ "spi_tx_%d", pdev->id);
if (!tspi->tx_dma) {
dev_err(&pdev->dev, "can not allocate tx dma channel\n");
ret = -ENODEV;
diff --git a/drivers/spi/spi_slave_tegra.c b/drivers/spi/spi_slave_tegra.c
index 568c987ff744..c95c852d94bb 100644
--- a/drivers/spi/spi_slave_tegra.c
+++ b/drivers/spi/spi_slave_tegra.c
@@ -1097,7 +1097,8 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
init_completion(&tspi->rx_dma_complete);
- tspi->rx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
+ tspi->rx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT,
+ "spi_rx_%d", pdev->id);
if (!tspi->rx_dma) {
dev_err(&pdev->dev, "can not allocate rx dma channel\n");
ret = -ENODEV;
@@ -1125,7 +1126,8 @@ static int __init spi_tegra_probe(struct platform_device *pdev)
tspi->rx_dma_req.req_sel = spi_tegra_req_sels[pdev->id];
tspi->rx_dma_req.dev = tspi;
- tspi->tx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
+ tspi->tx_dma = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT,
+ "spi_tx_%d", pdev->id);
if (!tspi->tx_dma) {
dev_err(&pdev->dev, "can not allocate tx dma channel\n");
ret = -ENODEV;