diff options
author | Paul Walmsley <paul@pwsan.com> | 2015-01-06 01:44:56 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-01-13 13:30:30 -0500 |
commit | 891653ab836d5a8ef9eba0d347318364bd309a00 (patch) | |
tree | f2e29752b621287dea6460dd6c8a0b8c263038b2 | |
parent | 0fdd244fe820c03b59ab1286db3d0b4a42c66e13 (diff) |
dmaengine: tegra: add slave capabilities reporting
After commit ecc19d17868be9c9f8f00ed928791533c420f3e0 ("dmaengine: Add
a warning for drivers not using the generic slave caps retrieval"),
the Tegra APB DMA driver causes this warning during boot:
WARNING: CPU: 0 PID: 1 at drivers/dma/dmaengine.c:830 dma_async_device_register+0x294/0x538()
this driver doesn't support generic slave capabilities reporting
Fix by setting the appropriate reporting structure fields that are
passed to dma_async_device_register().
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/tegra20-apb-dma.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 5695fb8a7a24..eaf585e8286b 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c | |||
@@ -1425,6 +1425,21 @@ static int tegra_dma_probe(struct platform_device *pdev) | |||
1425 | tegra_dma_free_chan_resources; | 1425 | tegra_dma_free_chan_resources; |
1426 | tdma->dma_dev.device_prep_slave_sg = tegra_dma_prep_slave_sg; | 1426 | tdma->dma_dev.device_prep_slave_sg = tegra_dma_prep_slave_sg; |
1427 | tdma->dma_dev.device_prep_dma_cyclic = tegra_dma_prep_dma_cyclic; | 1427 | tdma->dma_dev.device_prep_dma_cyclic = tegra_dma_prep_dma_cyclic; |
1428 | tdma->dma_dev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | | ||
1429 | BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | | ||
1430 | BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | | ||
1431 | BIT(DMA_SLAVE_BUSWIDTH_8_BYTES); | ||
1432 | tdma->dma_dev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | | ||
1433 | BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | | ||
1434 | BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | | ||
1435 | BIT(DMA_SLAVE_BUSWIDTH_8_BYTES); | ||
1436 | tdma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
1437 | /* | ||
1438 | * XXX The hardware appears to support | ||
1439 | * DMA_RESIDUE_GRANULARITY_BURST-level reporting, but it's | ||
1440 | * only used by this driver during tegra_dma_terminate_all() | ||
1441 | */ | ||
1442 | tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; | ||
1428 | tdma->dma_dev.device_config = tegra_dma_slave_config; | 1443 | tdma->dma_dev.device_config = tegra_dma_slave_config; |
1429 | tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all; | 1444 | tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all; |
1430 | tdma->dma_dev.device_tx_status = tegra_dma_tx_status; | 1445 | tdma->dma_dev.device_tx_status = tegra_dma_tx_status; |