diff options
| -rw-r--r-- | drivers/dma/ste_dma40.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 17e2600a00cf..d5fd098e22e8 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
| @@ -1857,6 +1857,18 @@ err: | |||
| 1857 | return NULL; | 1857 | return NULL; |
| 1858 | } | 1858 | } |
| 1859 | 1859 | ||
| 1860 | static struct dma_async_tx_descriptor * | ||
| 1861 | d40_prep_sg(struct dma_chan *chan, | ||
| 1862 | struct scatterlist *dst_sg, unsigned int dst_nents, | ||
| 1863 | struct scatterlist *src_sg, unsigned int src_nents, | ||
| 1864 | unsigned long dma_flags) | ||
| 1865 | { | ||
| 1866 | if (dst_nents != src_nents) | ||
| 1867 | return NULL; | ||
| 1868 | |||
| 1869 | return stedma40_memcpy_sg(chan, dst_sg, src_sg, dst_nents, dma_flags); | ||
| 1870 | } | ||
| 1871 | |||
| 1860 | static int d40_prep_slave_sg_log(struct d40_desc *d40d, | 1872 | static int d40_prep_slave_sg_log(struct d40_desc *d40d, |
| 1861 | struct d40_chan *d40c, | 1873 | struct d40_chan *d40c, |
| 1862 | struct scatterlist *sgl, | 1874 | struct scatterlist *sgl, |
| @@ -2281,6 +2293,7 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2281 | base->dma_slave.device_alloc_chan_resources = d40_alloc_chan_resources; | 2293 | base->dma_slave.device_alloc_chan_resources = d40_alloc_chan_resources; |
| 2282 | base->dma_slave.device_free_chan_resources = d40_free_chan_resources; | 2294 | base->dma_slave.device_free_chan_resources = d40_free_chan_resources; |
| 2283 | base->dma_slave.device_prep_dma_memcpy = d40_prep_memcpy; | 2295 | base->dma_slave.device_prep_dma_memcpy = d40_prep_memcpy; |
| 2296 | base->dma_slave.device_prep_dma_sg = d40_prep_sg; | ||
| 2284 | base->dma_slave.device_prep_slave_sg = d40_prep_slave_sg; | 2297 | base->dma_slave.device_prep_slave_sg = d40_prep_slave_sg; |
| 2285 | base->dma_slave.device_tx_status = d40_tx_status; | 2298 | base->dma_slave.device_tx_status = d40_tx_status; |
| 2286 | base->dma_slave.device_issue_pending = d40_issue_pending; | 2299 | base->dma_slave.device_issue_pending = d40_issue_pending; |
| @@ -2301,10 +2314,12 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2301 | 2314 | ||
| 2302 | dma_cap_zero(base->dma_memcpy.cap_mask); | 2315 | dma_cap_zero(base->dma_memcpy.cap_mask); |
| 2303 | dma_cap_set(DMA_MEMCPY, base->dma_memcpy.cap_mask); | 2316 | dma_cap_set(DMA_MEMCPY, base->dma_memcpy.cap_mask); |
| 2317 | dma_cap_set(DMA_SG, base->dma_slave.cap_mask); | ||
| 2304 | 2318 | ||
| 2305 | base->dma_memcpy.device_alloc_chan_resources = d40_alloc_chan_resources; | 2319 | base->dma_memcpy.device_alloc_chan_resources = d40_alloc_chan_resources; |
| 2306 | base->dma_memcpy.device_free_chan_resources = d40_free_chan_resources; | 2320 | base->dma_memcpy.device_free_chan_resources = d40_free_chan_resources; |
| 2307 | base->dma_memcpy.device_prep_dma_memcpy = d40_prep_memcpy; | 2321 | base->dma_memcpy.device_prep_dma_memcpy = d40_prep_memcpy; |
| 2322 | base->dma_slave.device_prep_dma_sg = d40_prep_sg; | ||
| 2308 | base->dma_memcpy.device_prep_slave_sg = d40_prep_slave_sg; | 2323 | base->dma_memcpy.device_prep_slave_sg = d40_prep_slave_sg; |
| 2309 | base->dma_memcpy.device_tx_status = d40_tx_status; | 2324 | base->dma_memcpy.device_tx_status = d40_tx_status; |
| 2310 | base->dma_memcpy.device_issue_pending = d40_issue_pending; | 2325 | base->dma_memcpy.device_issue_pending = d40_issue_pending; |
| @@ -2331,10 +2346,12 @@ static int __init d40_dmaengine_init(struct d40_base *base, | |||
| 2331 | dma_cap_zero(base->dma_both.cap_mask); | 2346 | dma_cap_zero(base->dma_both.cap_mask); |
| 2332 | dma_cap_set(DMA_SLAVE, base->dma_both.cap_mask); | 2347 | dma_cap_set(DMA_SLAVE, base->dma_both.cap_mask); |
| 2333 | dma_cap_set(DMA_MEMCPY, base->dma_both.cap_mask); | 2348 | dma_cap_set(DMA_MEMCPY, base->dma_both.cap_mask); |
| 2349 | dma_cap_set(DMA_SG, base->dma_slave.cap_mask); | ||
| 2334 | 2350 | ||
| 2335 | base->dma_both.device_alloc_chan_resources = d40_alloc_chan_resources; | 2351 | base->dma_both.device_alloc_chan_resources = d40_alloc_chan_resources; |
| 2336 | base->dma_both.device_free_chan_resources = d40_free_chan_resources; | 2352 | base->dma_both.device_free_chan_resources = d40_free_chan_resources; |
| 2337 | base->dma_both.device_prep_dma_memcpy = d40_prep_memcpy; | 2353 | base->dma_both.device_prep_dma_memcpy = d40_prep_memcpy; |
| 2354 | base->dma_slave.device_prep_dma_sg = d40_prep_sg; | ||
| 2338 | base->dma_both.device_prep_slave_sg = d40_prep_slave_sg; | 2355 | base->dma_both.device_prep_slave_sg = d40_prep_slave_sg; |
| 2339 | base->dma_both.device_tx_status = d40_tx_status; | 2356 | base->dma_both.device_tx_status = d40_tx_status; |
| 2340 | base->dma_both.device_issue_pending = d40_issue_pending; | 2357 | base->dma_both.device_issue_pending = d40_issue_pending; |
