diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2015-02-15 13:49:16 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-03-05 11:45:35 -0500 |
commit | ecb9b4241f696b746215b1de36106258bc8ed957 (patch) | |
tree | f364882cafed60b89160ac3a3da8327395624529 | |
parent | 90b1047f138459e86861cf401c5e9f0a9aa3b23b (diff) |
dmaengine: mmp_pdma: fix warning about slave caps
Fix the dmaengine complaint about missing slave caps :
- declare the available bus widths
- declare the available transfer types
- declare the residue calculation type
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/mmp_pdma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index abf1450bb25d..eb410044e1af 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c | |||
@@ -1002,6 +1002,9 @@ static int mmp_pdma_probe(struct platform_device *op) | |||
1002 | struct resource *iores; | 1002 | struct resource *iores; |
1003 | int i, ret, irq = 0; | 1003 | int i, ret, irq = 0; |
1004 | int dma_channels = 0, irq_num = 0; | 1004 | int dma_channels = 0, irq_num = 0; |
1005 | const enum dma_slave_buswidth widths = | ||
1006 | DMA_SLAVE_BUSWIDTH_1_BYTE | DMA_SLAVE_BUSWIDTH_2_BYTES | | ||
1007 | DMA_SLAVE_BUSWIDTH_4_BYTES; | ||
1005 | 1008 | ||
1006 | pdev = devm_kzalloc(&op->dev, sizeof(*pdev), GFP_KERNEL); | 1009 | pdev = devm_kzalloc(&op->dev, sizeof(*pdev), GFP_KERNEL); |
1007 | if (!pdev) | 1010 | if (!pdev) |
@@ -1069,6 +1072,10 @@ static int mmp_pdma_probe(struct platform_device *op) | |||
1069 | pdev->device.device_config = mmp_pdma_config; | 1072 | pdev->device.device_config = mmp_pdma_config; |
1070 | pdev->device.device_terminate_all = mmp_pdma_terminate_all; | 1073 | pdev->device.device_terminate_all = mmp_pdma_terminate_all; |
1071 | pdev->device.copy_align = PDMA_ALIGNMENT; | 1074 | pdev->device.copy_align = PDMA_ALIGNMENT; |
1075 | pdev->device.src_addr_widths = widths; | ||
1076 | pdev->device.dst_addr_widths = widths; | ||
1077 | pdev->device.directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM); | ||
1078 | pdev->device.residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; | ||
1072 | 1079 | ||
1073 | if (pdev->dev->coherent_dma_mask) | 1080 | if (pdev->dev->coherent_dma_mask) |
1074 | dma_set_mask(pdev->dev, pdev->dev->coherent_dma_mask); | 1081 | dma_set_mask(pdev->dev, pdev->dev->coherent_dma_mask); |