Lines Matching refs:dma_ch
30 struct dma_channel dma_ch[MAX_DMA_CHANNELS]; variable
31 EXPORT_SYMBOL(dma_ch);
40 atomic_set(&dma_ch[i].chan_status, 0); in blackfin_dma_init()
41 dma_ch[i].regs = dma_io_base_addr[i]; in blackfin_dma_init()
63 seq_printf(m, "%2d: %s\n", i, dma_ch[i].device_id); in proc_dma_show()
101 dma_ch[channel].regs->peripheral_map = per_map; in set_dma_peripheral_map()
127 if (atomic_cmpxchg(&dma_ch[channel].chan_status, 0, 1)) { in request_dma()
133 dma_ch[channel].device_id = device_id; in request_dma()
134 dma_ch[channel].irq = 0; in request_dma()
151 !atomic_read(&dma_ch[channel].chan_status)); in set_dma_callback()
154 ret = request_irq(irq, callback, 0, dma_ch[channel].device_id, data); in set_dma_callback()
158 dma_ch[channel].irq = irq; in set_dma_callback()
159 dma_ch[channel].data = data; in set_dma_callback()
173 dma_ch[channel].regs->cfg |= RESTART; in clear_dma_buffer()
175 dma_ch[channel].regs->cfg &= ~RESTART; in clear_dma_buffer()
182 !atomic_read(&dma_ch[channel].chan_status)); in free_dma()
188 if (dma_ch[channel].irq) in free_dma()
189 free_irq(dma_ch[channel].irq, dma_ch[channel].data); in free_dma()
192 atomic_set(&dma_ch[channel].chan_status, 0); in free_dma()
207 if (dma_ch[i].regs->cfg & DMAEN) { in blackfin_dma_suspend()
213 dma_ch[i].saved_peripheral_map = dma_ch[i].regs->peripheral_map; in blackfin_dma_suspend()
224 dma_ch[i].regs->cfg = 0; in blackfin_dma_resume()
227 dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; in blackfin_dma_resume()