diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2015-03-05 13:03:04 (GMT) |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-03-05 16:14:38 (GMT) |
commit | fe4be5e9f99d433fe6420a12f4e94f05f2ae39a6 (patch) | |
tree | 2cb50370c9d874e2984e20973d68bc5c8ffdff74 | |
parent | 9ca1c5f2ab9d5bc8955a2cc7ad36ba7074dd7c60 (diff) | |
download | linux-fe4be5e9f99d433fe6420a12f4e94f05f2ae39a6.tar.xz |
dmaengine: bam-dma: fix a warning about missing capabilities
Avoid the warning below triggered during dmaengine async device
registration.
WARNING: CPU: 1 PID: 1 at linux/drivers/dma/dmaengine.c:863
dma_async_device_register+0x2a8/0x4b8()
this driver doesn't support generic slave capabilities reporting
To do that fill mandatory .directions bit mask,
.src/dst_addr_widths and .residue_granularity dma_device fields
with appropriate values.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/qcom_bam_dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/qcom_bam_dma.c b/drivers/dma/qcom_bam_dma.c index d7a33b3..d9f1a18 100644 --- a/drivers/dma/qcom_bam_dma.c +++ b/drivers/dma/qcom_bam_dma.c @@ -1143,6 +1143,10 @@ static int bam_dma_probe(struct platform_device *pdev) dma_cap_set(DMA_SLAVE, bdev->common.cap_mask); /* initialize dmaengine apis */ + bdev->common.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); + bdev->common.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT; + bdev->common.src_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; + bdev->common.dst_addr_widths = DMA_SLAVE_BUSWIDTH_4_BYTES; bdev->common.device_alloc_chan_resources = bam_alloc_chan; bdev->common.device_free_chan_resources = bam_free_chan; bdev->common.device_prep_slave_sg = bam_prep_slave_sg; |