X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=blobdiff_plain;f=include%2Flinux%2Fdmaengine.h;h=00d2addf22e585000f2b3c0b70bc15e9e79179ab;hp=96d3e4ab11a91a4ea28d0f864d1cfbee6e249127;hb=5013a8fe9733d7906daf046cd164bb2028a63fea;hpb=977b58e1dd6fc2a751fb427798bfb8256476c93e diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 96d3e4ab11a9..00d2addf22e5 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -601,6 +601,10 @@ struct dma_device { enum dma_status (*device_tx_status)(struct dma_chan *chan, dma_cookie_t cookie, struct dma_tx_state *txstate); +#ifdef CONFIG_ARCH_ROCKCHIP + int (*dma_getposition)(struct dma_chan *chan, + dma_addr_t *src, dma_addr_t *dst); +#endif void (*device_issue_pending)(struct dma_chan *chan); }; @@ -664,9 +668,21 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( size_t period_len, enum dma_transfer_direction dir, unsigned long flags) { + unsigned int t=0; return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, - period_len, dir, flags, NULL); + period_len, dir, flags, &t); } +#ifdef CONFIG_ARCH_ROCKCHIP +static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_infiniteloop( + struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, + size_t period_len, enum dma_transfer_direction dir, + unsigned long flags,unsigned int limit) +{ + unsigned int t=limit; + return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len, + period_len, dir, flags, &t); +} +#endif static inline struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma( struct dma_chan *chan, struct dma_interleaved_template *xt,