Lines Matching full:controller
32 struct ux500_dma_controller *controller; member
43 struct dma_controller controller; member
59 dev_dbg(musb->controller, "DMA rx transfer done on hw_ep=%d\n", in ux500_dma_callback()
82 struct musb *musb = ux500_channel->controller->private_data; in ux500_configure_channel()
84 ux500_channel->controller->phy_base); in ux500_configure_channel()
86 dev_dbg(musb->controller, in ux500_configure_channel()
131 struct ux500_dma_controller *controller = container_of(c, in ux500_dma_channel_allocate() local
132 struct ux500_dma_controller, controller); in ux500_dma_channel_allocate()
134 struct musb *musb = controller->private_data; in ux500_dma_channel_allocate()
147 ux500_channel = is_tx ? &(controller->tx_channel[ch_num]) : in ux500_dma_channel_allocate()
148 &(controller->rx_channel[ch_num]) ; in ux500_dma_channel_allocate()
157 dev_dbg(musb->controller, "hw_ep=%d, is_tx=0x%x, channel=%d\n", in ux500_dma_channel_allocate()
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()
210 struct ux500_dma_controller *controller = ux500_channel->controller; in ux500_dma_channel_abort() local
211 struct musb *musb = controller->private_data; in ux500_dma_channel_abort()
215 dev_dbg(musb->controller, "channel=%d, is_tx=%d\n", in ux500_dma_channel_abort()
239 static void ux500_dma_controller_stop(struct ux500_dma_controller *controller) in ux500_dma_controller_stop() argument
246 channel = &controller->rx_channel[ch_num].channel; in ux500_dma_controller_stop()
256 channel = &controller->tx_channel[ch_num].channel; in ux500_dma_controller_stop()
266 static int ux500_dma_controller_start(struct ux500_dma_controller *controller) in ux500_dma_controller_start() argument
269 struct musb *musb = controller->private_data; in ux500_dma_controller_start()
270 struct device *dev = musb->controller; in ux500_dma_controller_start()
284 dev_err(musb->controller, "No platform data\n"); in ux500_dma_controller_start()
294 channel_array = controller->rx_channel; in ux500_dma_controller_start()
303 ux500_channel->controller = controller; in ux500_dma_controller_start()
330 ux500_dma_controller_stop(controller); in ux500_dma_controller_start()
338 channel_array = controller->tx_channel; in ux500_dma_controller_start()
349 struct ux500_dma_controller *controller = container_of(c, in ux500_dma_controller_destroy() local
350 struct ux500_dma_controller, controller); in ux500_dma_controller_destroy()
352 ux500_dma_controller_stop(controller); in ux500_dma_controller_destroy()
353 kfree(controller); in ux500_dma_controller_destroy()
360 struct ux500_dma_controller *controller; in ux500_dma_controller_create() local
361 struct platform_device *pdev = to_platform_device(musb->controller); in ux500_dma_controller_create()
365 controller = kzalloc(sizeof(*controller), GFP_KERNEL); in ux500_dma_controller_create()
366 if (!controller) in ux500_dma_controller_create()
369 controller->private_data = musb; in ux500_dma_controller_create()
371 /* Save physical address for DMA controller. */ in ux500_dma_controller_create()
374 dev_err(musb->controller, "no memory resource defined\n"); in ux500_dma_controller_create()
378 controller->phy_base = (dma_addr_t) iomem->start; in ux500_dma_controller_create()
380 controller->controller.channel_alloc = ux500_dma_channel_allocate; in ux500_dma_controller_create()
381 controller->controller.channel_release = ux500_dma_channel_release; in ux500_dma_controller_create()
382 controller->controller.channel_program = ux500_dma_channel_program; in ux500_dma_controller_create()
383 controller->controller.channel_abort = ux500_dma_channel_abort; in ux500_dma_controller_create()
384 controller->controller.is_compatible = ux500_dma_is_compatible; in ux500_dma_controller_create()
386 ret = ux500_dma_controller_start(controller); in ux500_dma_controller_create()
389 return &controller->controller; in ux500_dma_controller_create()
392 kfree(controller); in ux500_dma_controller_create()