X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Flinux%2Fdmaengine.h;h=96d3e4ab11a91a4ea28d0f864d1cfbee6e249127;hb=5013a8fe9733d7906daf046cd164bb2028a63fea;hp=91ac8da2502017a0463f73e2394c2778bd78376d;hpb=aa1262b3876ec5249ff464618a7dcd46b3ca54e2;p=firefly-linux-kernel-4.4.55.git diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 91ac8da25020..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, @@ -967,8 +983,9 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); #ifdef CONFIG_DMA_ENGINE enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); void dma_issue_pending_all(void); -struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); -struct dma_chan *dma_request_slave_channel(struct device *dev, char *name); +struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, + dma_filter_fn fn, void *fn_param); +struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); void dma_release_channel(struct dma_chan *chan); #else static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) @@ -978,13 +995,13 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript static inline void dma_issue_pending_all(void) { } -static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, +static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param) { return NULL; } static inline struct dma_chan *dma_request_slave_channel(struct device *dev, - char *name) + const char *name) { return NULL; } @@ -1005,9 +1022,9 @@ struct dma_chan *net_dma_find_channel(void); __dma_request_slave_channel_compat(&(mask), x, y, dev, name) static inline struct dma_chan -*__dma_request_slave_channel_compat(dma_cap_mask_t *mask, dma_filter_fn fn, - void *fn_param, struct device *dev, - char *name) +*__dma_request_slave_channel_compat(const dma_cap_mask_t *mask, + dma_filter_fn fn, void *fn_param, + struct device *dev, char *name) { struct dma_chan *chan;