Lines Matching refs:controller
50 struct musb_dma_controller *controller = container_of(c, in dma_controller_stop() local
51 struct musb_dma_controller, controller); in dma_controller_stop()
52 struct musb *musb = controller->private_data; in dma_controller_stop()
56 if (controller->used_channels != 0) { in dma_controller_stop()
57 dev_err(musb->controller, in dma_controller_stop()
61 if (controller->used_channels & (1 << bit)) { in dma_controller_stop()
62 channel = &controller->channel[bit].channel; in dma_controller_stop()
65 if (!controller->used_channels) in dma_controller_stop()
77 struct musb_dma_controller *controller = container_of(c, in dma_channel_allocate() local
78 struct musb_dma_controller, controller); in dma_channel_allocate()
84 if (!(controller->used_channels & (1 << bit))) { in dma_channel_allocate()
85 controller->used_channels |= (1 << bit); in dma_channel_allocate()
86 musb_channel = &(controller->channel[bit]); in dma_channel_allocate()
87 musb_channel->controller = controller; in dma_channel_allocate()
113 musb_channel->controller->used_channels &= in dma_channel_release()
124 struct musb_dma_controller *controller = musb_channel->controller; in configure_channel() local
125 struct musb *musb = controller->private_data; in configure_channel()
126 void __iomem *mbase = controller->base; in configure_channel()
130 dev_dbg(musb->controller, "%p, pkt_sz %d, addr 0x%x, len %d, mode %d\n", in configure_channel()
162 struct musb_dma_controller *controller = musb_channel->controller; in dma_channel_program() local
163 struct musb *musb = controller->private_data; in dma_channel_program()
165 dev_dbg(musb->controller, "ep%d-%s pkt_sz %d, dma_addr 0x%x length %d, mode %d\n", in dma_channel_program()
207 void __iomem *mbase = musb_channel->controller->base; in dma_channel_abort()
251 struct musb_dma_controller *controller = private_data; in dma_controller_irq() local
252 struct musb *musb = controller->private_data; in dma_controller_irq()
256 void __iomem *mbase = controller->base; in dma_controller_irq()
278 dev_dbg(musb->controller, "spurious DMA irq\n"); in dma_controller_irq()
282 &(controller->channel[bchannel]); in dma_controller_irq()
292 dev_dbg(musb->controller, "int_hsdma = 0x%x\n", int_hsdma); in dma_controller_irq()
301 &(controller->channel[bchannel]); in dma_controller_irq()
319 dev_dbg(musb->controller, "ch %p, 0x%x -> 0x%x (%zu / %d) %s\n", in dma_controller_irq()
371 struct musb_dma_controller *controller = container_of(c, in dma_controller_destroy() local
372 struct musb_dma_controller, controller); in dma_controller_destroy()
374 if (!controller) in dma_controller_destroy()
377 if (controller->irq) in dma_controller_destroy()
378 free_irq(controller->irq, c); in dma_controller_destroy()
380 kfree(controller); in dma_controller_destroy()
385 struct musb_dma_controller *controller; in dma_controller_create() local
386 struct device *dev = musb->controller; in dma_controller_create()
395 controller = kzalloc(sizeof(*controller), GFP_KERNEL); in dma_controller_create()
396 if (!controller) in dma_controller_create()
399 controller->channel_count = MUSB_HSDMA_CHANNELS; in dma_controller_create()
400 controller->private_data = musb; in dma_controller_create()
401 controller->base = base; in dma_controller_create()
403 controller->controller.start = dma_controller_start; in dma_controller_create()
404 controller->controller.stop = dma_controller_stop; in dma_controller_create()
405 controller->controller.channel_alloc = dma_channel_allocate; in dma_controller_create()
406 controller->controller.channel_release = dma_channel_release; in dma_controller_create()
407 controller->controller.channel_program = dma_channel_program; in dma_controller_create()
408 controller->controller.channel_abort = dma_channel_abort; in dma_controller_create()
411 dev_name(musb->controller), &controller->controller)) { in dma_controller_create()
413 dma_controller_destroy(&controller->controller); in dma_controller_create()
418 controller->irq = irq; in dma_controller_create()
420 return &controller->controller; in dma_controller_create()