Lines Matching refs:ux500_channel

54 	struct ux500_dma_channel *ux500_channel = channel->private_data;  in ux500_dma_callback()  local
55 struct musb_hw_ep *hw_ep = ux500_channel->hw_ep; in ux500_dma_callback()
63 ux500_channel->channel.actual_len = ux500_channel->cur_len; in ux500_dma_callback()
64 ux500_channel->channel.status = MUSB_DMA_STATUS_FREE; in ux500_dma_callback()
65 musb_dma_completion(musb, hw_ep->epnum, ux500_channel->is_tx); in ux500_dma_callback()
74 struct ux500_dma_channel *ux500_channel = channel->private_data; in ux500_configure_channel() local
75 struct musb_hw_ep *hw_ep = ux500_channel->hw_ep; in ux500_configure_channel()
76 struct dma_chan *dma_chan = ux500_channel->dma_chan; in ux500_configure_channel()
82 struct musb *musb = ux500_channel->controller->private_data; in ux500_configure_channel()
84 ux500_channel->controller->phy_base); in ux500_configure_channel()
89 len, ux500_channel->is_tx); in ux500_configure_channel()
91 ux500_channel->cur_len = len; in ux500_configure_channel()
99 direction = ux500_channel->is_tx ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; in ux500_configure_channel()
121 ux500_channel->cookie = dma_desc->tx_submit(dma_desc); in ux500_configure_channel()
133 struct ux500_dma_channel *ux500_channel = NULL; in ux500_dma_channel_allocate() local
147 ux500_channel = is_tx ? &(controller->tx_channel[ch_num]) : in ux500_dma_channel_allocate()
151 if (ux500_channel->is_allocated) in ux500_dma_channel_allocate()
154 ux500_channel->hw_ep = hw_ep; in ux500_dma_channel_allocate()
155 ux500_channel->is_allocated = 1; in ux500_dma_channel_allocate()
160 return &(ux500_channel->channel); in ux500_dma_channel_allocate()
165 struct ux500_dma_channel *ux500_channel = channel->private_data; in ux500_dma_channel_release() local
166 struct musb *musb = ux500_channel->controller->private_data; in ux500_dma_channel_release()
168 dev_dbg(musb->controller, "channel=%d\n", ux500_channel->ch_num); in ux500_dma_channel_release()
170 if (ux500_channel->is_allocated) { in ux500_dma_channel_release()
171 ux500_channel->is_allocated = 0; in ux500_dma_channel_release()
209 struct ux500_dma_channel *ux500_channel = channel->private_data; in ux500_dma_channel_abort() local
210 struct ux500_dma_controller *controller = ux500_channel->controller; in ux500_dma_channel_abort()
212 void __iomem *epio = musb->endpoints[ux500_channel->hw_ep->epnum].regs; in ux500_dma_channel_abort()
216 ux500_channel->ch_num, ux500_channel->is_tx); in ux500_dma_channel_abort()
219 if (ux500_channel->is_tx) { in ux500_dma_channel_abort()
233 dmaengine_terminate_all(ux500_channel->dma_chan); in ux500_dma_channel_abort()
241 struct ux500_dma_channel *ux500_channel; in ux500_dma_controller_stop() local
247 ux500_channel = channel->private_data; in ux500_dma_controller_stop()
251 if (ux500_channel->dma_chan) in ux500_dma_controller_stop()
252 dma_release_channel(ux500_channel->dma_chan); in ux500_dma_controller_stop()
257 ux500_channel = channel->private_data; in ux500_dma_controller_stop()
261 if (ux500_channel->dma_chan) in ux500_dma_controller_stop()
262 dma_release_channel(ux500_channel->dma_chan); in ux500_dma_controller_stop()
268 struct ux500_dma_channel *ux500_channel = NULL; in ux500_dma_controller_start() local
302 ux500_channel = &channel_array[ch_num]; in ux500_dma_controller_start()
303 ux500_channel->controller = controller; in ux500_dma_controller_start()
304 ux500_channel->ch_num = ch_num; in ux500_dma_controller_start()
305 ux500_channel->is_tx = is_tx; in ux500_dma_controller_start()
307 dma_channel = &(ux500_channel->channel); in ux500_dma_controller_start()
308 dma_channel->private_data = ux500_channel; in ux500_dma_controller_start()
312 ux500_channel->dma_chan = in ux500_dma_controller_start()
315 if (!ux500_channel->dma_chan) in ux500_dma_controller_start()
316 ux500_channel->dma_chan = in ux500_dma_controller_start()
325 if (!ux500_channel->dma_chan) { in ux500_dma_controller_start()