Merge branch 'topic/xdmac' into for-linus
This commit is contained in:
commit
4fb9c15b4f
4 changed files with 391 additions and 52 deletions
|
@ -923,6 +923,33 @@ static inline int dma_maxpq(struct dma_device *dma, enum dma_ctrl_flags flags)
|
|||
BUG();
|
||||
}
|
||||
|
||||
static inline size_t dmaengine_get_icg(bool inc, bool sgl, size_t icg,
|
||||
size_t dir_icg)
|
||||
{
|
||||
if (inc) {
|
||||
if (dir_icg)
|
||||
return dir_icg;
|
||||
else if (sgl)
|
||||
return icg;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline size_t dmaengine_get_dst_icg(struct dma_interleaved_template *xt,
|
||||
struct data_chunk *chunk)
|
||||
{
|
||||
return dmaengine_get_icg(xt->dst_inc, xt->dst_sgl,
|
||||
chunk->icg, chunk->dst_icg);
|
||||
}
|
||||
|
||||
static inline size_t dmaengine_get_src_icg(struct dma_interleaved_template *xt,
|
||||
struct data_chunk *chunk)
|
||||
{
|
||||
return dmaengine_get_icg(xt->src_inc, xt->src_sgl,
|
||||
chunk->icg, chunk->src_icg);
|
||||
}
|
||||
|
||||
/* --- public DMA engine API --- */
|
||||
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue