Lines Matching refs:channel

76 	struct dma_channel *channel;  in get_dma_channel()  local
83 channel = &info->channels[i]; in get_dma_channel()
84 if (channel->vchan == chan) in get_dma_channel()
85 return channel; in get_dma_channel()
95 struct dma_channel *channel = get_dma_channel(chan); in get_dma_residue() local
98 return info->ops->get_residue(channel); in get_dma_residue()
147 struct dma_channel *channel = &info->channels[i]; in request_dma_bycap() local
149 if (unlikely(!channel->caps)) in request_dma_bycap()
153 if (!search_cap(channel->caps, *p)) in request_dma_bycap()
155 if (request_dma(channel->chan, dev_id) == 0) in request_dma_bycap()
156 return channel->chan; in request_dma_bycap()
166 struct dma_channel *channel = { 0 }; in dmac_search_free_channel() local
171 channel = &info->channels[i]; in dmac_search_free_channel()
172 if (unlikely(!channel)) in dmac_search_free_channel()
175 if (atomic_read(&channel->busy) == 0) in dmac_search_free_channel()
180 int result = info->ops->request(channel); in dmac_search_free_channel()
184 atomic_set(&channel->busy, 1); in dmac_search_free_channel()
185 return channel->chan; in dmac_search_free_channel()
193 struct dma_channel *channel = { 0 }; in request_dma() local
197 channel = get_dma_channel(chan); in request_dma()
198 if (atomic_xchg(&channel->busy, 1)) in request_dma()
201 strscpy(channel->dev_id, dev_id, sizeof(channel->dev_id)); in request_dma()
204 result = info->ops->request(channel); in request_dma()
206 atomic_set(&channel->busy, 0); in request_dma()
218 struct dma_channel *channel = get_dma_channel(chan); in free_dma() local
221 info->ops->free(channel); in free_dma()
223 atomic_set(&channel->busy, 0); in free_dma()
230 struct dma_channel *channel = get_dma_channel(chan); in dma_wait_for_completion() local
232 if (channel->flags & DMA_TEI_CAPABLE) { in dma_wait_for_completion()
233 wait_event(channel->wait_queue, in dma_wait_for_completion()
234 (info->ops->get_residue(channel) == 0)); in dma_wait_for_completion()
238 while (info->ops->get_residue(channel)) in dma_wait_for_completion()
259 struct dma_channel *channel; in register_chan_caps() local
264 channel = &info->channels[i]; in register_chan_caps()
265 channel->caps = caps->caplist; in register_chan_caps()
275 struct dma_channel *channel = get_dma_channel(chan); in dma_configure_channel() local
278 info->ops->configure(channel, flags); in dma_configure_channel()
286 struct dma_channel *channel = get_dma_channel(chan); in dma_xfer() local
288 channel->sar = from; in dma_xfer()
289 channel->dar = to; in dma_xfer()
290 channel->count = size; in dma_xfer()
291 channel->mode = mode; in dma_xfer()
293 return info->ops->xfer(channel); in dma_xfer()
300 struct dma_channel *channel = get_dma_channel(chan); in dma_extend() local
303 return info->ops->extend(channel, op, param); in dma_extend()
326 struct dma_channel *channel = info->channels + i; in dma_proc_show() local
328 if (!(channel->flags & DMA_CONFIGURED)) in dma_proc_show()
332 info->name, channel->dev_id); in dma_proc_show()