Lines Matching refs:controller

60 	struct musb_dma_controller	*controller;  member
70 struct dma_controller controller; member
81 static void dma_controller_stop(struct musb_dma_controller *controller) in dma_controller_stop() argument
83 struct musb *musb = controller->private_data; in dma_controller_stop()
87 if (controller->used_channels != 0) { in dma_controller_stop()
88 dev_err(musb->controller, in dma_controller_stop()
92 if (controller->used_channels & (1 << bit)) { in dma_controller_stop()
93 channel = &controller->channel[bit].channel; in dma_controller_stop()
96 if (!controller->used_channels) in dma_controller_stop()
106 struct musb_dma_controller *controller = container_of(c, in dma_channel_allocate() local
107 struct musb_dma_controller, controller); in dma_channel_allocate()
113 if (!(controller->used_channels & (1 << bit))) { in dma_channel_allocate()
114 controller->used_channels |= (1 << bit); in dma_channel_allocate()
115 musb_channel = &(controller->channel[bit]); in dma_channel_allocate()
116 musb_channel->controller = controller; in dma_channel_allocate()
142 musb_channel->controller->used_channels &= in dma_channel_release()
153 struct musb_dma_controller *controller = musb_channel->controller; in configure_channel() local
154 struct musb *musb = controller->private_data; in configure_channel()
155 void __iomem *mbase = controller->base; in configure_channel()
191 struct musb_dma_controller *controller = musb_channel->controller; in dma_channel_program() local
192 struct musb *musb = controller->private_data; in dma_channel_program()
228 void __iomem *mbase = musb_channel->controller->base; in dma_channel_abort()
229 struct musb *musb = musb_channel->controller->private_data; in dma_channel_abort()
273 struct musb_dma_controller *controller = private_data; in dma_controller_irq() local
274 struct musb *musb = controller->private_data; in dma_controller_irq()
278 void __iomem *mbase = controller->base; in dma_controller_irq()
299 &(controller->channel[bchannel]); in dma_controller_irq()
318 &(controller->channel[bchannel]); in dma_controller_irq()
388 struct musb_dma_controller *controller = container_of(c, in musbhs_dma_controller_destroy() local
389 struct musb_dma_controller, controller); in musbhs_dma_controller_destroy()
391 dma_controller_stop(controller); in musbhs_dma_controller_destroy()
393 if (controller->irq) in musbhs_dma_controller_destroy()
394 free_irq(controller->irq, c); in musbhs_dma_controller_destroy()
396 kfree(controller); in musbhs_dma_controller_destroy()
403 struct musb_dma_controller *controller; in musbhs_dma_controller_create() local
404 struct device *dev = musb->controller; in musbhs_dma_controller_create()
413 controller = kzalloc(sizeof(*controller), GFP_KERNEL); in musbhs_dma_controller_create()
414 if (!controller) in musbhs_dma_controller_create()
417 controller->channel_count = MUSB_HSDMA_CHANNELS; in musbhs_dma_controller_create()
418 controller->private_data = musb; in musbhs_dma_controller_create()
419 controller->base = base; in musbhs_dma_controller_create()
421 controller->controller.channel_alloc = dma_channel_allocate; in musbhs_dma_controller_create()
422 controller->controller.channel_release = dma_channel_release; in musbhs_dma_controller_create()
423 controller->controller.channel_program = dma_channel_program; in musbhs_dma_controller_create()
424 controller->controller.channel_abort = dma_channel_abort; in musbhs_dma_controller_create()
427 dev_name(musb->controller), &controller->controller)) { in musbhs_dma_controller_create()
429 musb_dma_controller_destroy(&controller->controller); in musbhs_dma_controller_create()
434 controller->irq = irq; in musbhs_dma_controller_create()
436 return &controller->controller; in musbhs_dma_controller_create()