diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/sh/shdmac.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index aec8a84784a4..ce4cd6be07cf 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c | |||
@@ -684,6 +684,10 @@ MODULE_DEVICE_TABLE(of, sh_dmae_of_match); | |||
684 | 684 | ||
685 | static int sh_dmae_probe(struct platform_device *pdev) | 685 | static int sh_dmae_probe(struct platform_device *pdev) |
686 | { | 686 | { |
687 | const enum dma_slave_buswidth widths = | ||
688 | DMA_SLAVE_BUSWIDTH_1_BYTE | DMA_SLAVE_BUSWIDTH_2_BYTES | | ||
689 | DMA_SLAVE_BUSWIDTH_4_BYTES | DMA_SLAVE_BUSWIDTH_8_BYTES | | ||
690 | DMA_SLAVE_BUSWIDTH_16_BYTES | DMA_SLAVE_BUSWIDTH_32_BYTES; | ||
687 | const struct sh_dmae_pdata *pdata; | 691 | const struct sh_dmae_pdata *pdata; |
688 | unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {}; | 692 | unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {}; |
689 | int chan_irq[SH_DMAE_MAX_CHANNELS]; | 693 | int chan_irq[SH_DMAE_MAX_CHANNELS]; |
@@ -746,6 +750,11 @@ static int sh_dmae_probe(struct platform_device *pdev) | |||
746 | return PTR_ERR(shdev->dmars); | 750 | return PTR_ERR(shdev->dmars); |
747 | } | 751 | } |
748 | 752 | ||
753 | dma_dev->src_addr_widths = widths; | ||
754 | dma_dev->dst_addr_widths = widths; | ||
755 | dma_dev->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM); | ||
756 | dma_dev->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; | ||
757 | |||
749 | if (!pdata->slave_only) | 758 | if (!pdata->slave_only) |
750 | dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); | 759 | dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask); |
751 | if (pdata->slave && pdata->slave_num) | 760 | if (pdata->slave && pdata->slave_num) |