1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2a57e16cfSRobert Jarzmik #ifndef _PXA_DMA_H_ 3a57e16cfSRobert Jarzmik #define _PXA_DMA_H_ 4a57e16cfSRobert Jarzmik 5a57e16cfSRobert Jarzmik enum pxad_chan_prio { 6a57e16cfSRobert Jarzmik PXAD_PRIO_HIGHEST = 0, 7a57e16cfSRobert Jarzmik PXAD_PRIO_NORMAL, 8a57e16cfSRobert Jarzmik PXAD_PRIO_LOW, 9a57e16cfSRobert Jarzmik PXAD_PRIO_LOWEST, 10a57e16cfSRobert Jarzmik }; 11a57e16cfSRobert Jarzmik 12b6d1a17fSRobert Jarzmik /** 13b6d1a17fSRobert Jarzmik * struct pxad_param - dma channel request parameters 14b6d1a17fSRobert Jarzmik * @drcmr: requestor line number 15b6d1a17fSRobert Jarzmik * @prio: minimal mandatory priority of the channel 16b6d1a17fSRobert Jarzmik * 17b6d1a17fSRobert Jarzmik * If a requested channel is granted, its priority will be at least @prio, 18b6d1a17fSRobert Jarzmik * ie. if PXAD_PRIO_LOW is required, the requested channel will be either 19b6d1a17fSRobert Jarzmik * PXAD_PRIO_LOW, PXAD_PRIO_NORMAL or PXAD_PRIO_HIGHEST. 20b6d1a17fSRobert Jarzmik */ 21a57e16cfSRobert Jarzmik struct pxad_param { 22a57e16cfSRobert Jarzmik unsigned int drcmr; 23a57e16cfSRobert Jarzmik enum pxad_chan_prio prio; 24a57e16cfSRobert Jarzmik }; 25a57e16cfSRobert Jarzmik 26a57e16cfSRobert Jarzmik struct dma_chan; 27a57e16cfSRobert Jarzmik 28a57e16cfSRobert Jarzmik #ifdef CONFIG_PXA_DMA 29a57e16cfSRobert Jarzmik bool pxad_filter_fn(struct dma_chan *chan, void *param); 30a57e16cfSRobert Jarzmik #else 31a57e16cfSRobert Jarzmik static inline bool pxad_filter_fn(struct dma_chan *chan, void *param) 32a57e16cfSRobert Jarzmik { 33a57e16cfSRobert Jarzmik return false; 34a57e16cfSRobert Jarzmik } 35a57e16cfSRobert Jarzmik #endif 36a57e16cfSRobert Jarzmik 37a57e16cfSRobert Jarzmik #endif /* _PXA_DMA_H_ */ 38