mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
dmaengine: dw: some Intel devices has no memcpy support
Provide a flag to choose if the device does support memory-to-memory transfers. At least this is not true for iDMA32 controller that might be supported in the future. Besides that Intel BayTrail and Braswell users should not try this feature due to HW specific behaviour. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
175267b389
commit
df5c7386f6
2 changed files with 7 additions and 1 deletions
|
|
@ -1541,6 +1541,7 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
|
|||
|
||||
/* Fill platform data with the default values */
|
||||
pdata->is_private = true;
|
||||
pdata->is_memcpy = true;
|
||||
pdata->chan_allocation_order = CHAN_ALLOCATION_ASCENDING;
|
||||
pdata->chan_priority = CHAN_PRIORITY_ASCENDING;
|
||||
} else if (pdata->nr_channels > DW_DMA_MAX_NR_CHANNELS) {
|
||||
|
|
@ -1653,10 +1654,13 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
|
|||
dma_writel(dw, CLEAR.DST_TRAN, dw->all_chan_mask);
|
||||
dma_writel(dw, CLEAR.ERROR, dw->all_chan_mask);
|
||||
|
||||
dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
|
||||
/* Set capabilities */
|
||||
dma_cap_set(DMA_SLAVE, dw->dma.cap_mask);
|
||||
if (pdata->is_private)
|
||||
dma_cap_set(DMA_PRIVATE, dw->dma.cap_mask);
|
||||
if (pdata->is_memcpy)
|
||||
dma_cap_set(DMA_MEMCPY, dw->dma.cap_mask);
|
||||
|
||||
dw->dma.dev = chip->dev;
|
||||
dw->dma.device_alloc_chan_resources = dwc_alloc_chan_resources;
|
||||
dw->dma.device_free_chan_resources = dwc_free_chan_resources;
|
||||
|
|
|
|||
Loading…
Reference in a new issue