mxs-dma.h 798 B

123456789101112131415161718192021222324
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _MXS_DMA_H_
  3. #define _MXS_DMA_H_
  4. #include <linux/dmaengine.h>
  5. #define MXS_DMA_CTRL_WAIT4END BIT(31)
  6. #define MXS_DMA_CTRL_WAIT4RDY BIT(30)
  7. /*
  8. * The mxs dmaengine can do PIO transfers. We pass a pointer to the PIO words
  9. * in the second argument to dmaengine_prep_slave_sg when the direction is
  10. * set to DMA_TRANS_NONE. To make this clear and to prevent users from doing
  11. * the error prone casting we have this wrapper function
  12. */
  13. static inline struct dma_async_tx_descriptor *mxs_dmaengine_prep_pio(
  14. struct dma_chan *chan, u32 *pio, unsigned int npio,
  15. enum dma_transfer_direction dir, unsigned long flags)
  16. {
  17. return dmaengine_prep_slave_sg(chan, (struct scatterlist *)pio, npio,
  18. dir, flags);
  19. }
  20. #endif /* _MXS_DMA_H_ */