Lines Matching refs:tusb_dma
39 struct tusb_omap_dma *tusb_dma; member
101 struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; in tusb_omap_dma_cb() local
153 if (!tusb_dma->multichannel) in tusb_omap_dma_cb()
185 struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; in tusb_omap_dma_program() local
239 if (!tusb_dma->multichannel) { in tusb_omap_dma_program()
400 chdat->dma_data = &chdat->tusb_dma->dma_pool[dmareq_nr]; in tusb_omap_dma_allocate_dmareq()
427 struct tusb_omap_dma *tusb_dma; in tusb_omap_dma_allocate() local
433 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in tusb_omap_dma_allocate()
434 musb = tusb_dma->controller.musb; in tusb_omap_dma_allocate()
455 chdat->musb = tusb_dma->controller.musb; in tusb_omap_dma_allocate()
456 chdat->tbase = tusb_dma->tbase; in tusb_omap_dma_allocate()
460 chdat->tusb_dma = tusb_dma; in tusb_omap_dma_allocate()
471 if (tusb_dma->multichannel) { in tusb_omap_dma_allocate()
476 chdat->dma_data = &tusb_dma->dma_pool[0]; in tusb_omap_dma_allocate()
485 tusb_dma->multichannel ? "shared" : "dedicated", in tusb_omap_dma_allocate()
516 struct tusb_omap_dma *tusb_dma; in tusb_dma_controller_destroy() local
519 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in tusb_dma_controller_destroy()
528 if (tusb_dma && tusb_dma->dma_pool[i].chan) in tusb_dma_controller_destroy()
529 dma_release_channel(tusb_dma->dma_pool[i].chan); in tusb_dma_controller_destroy()
532 kfree(tusb_dma); in tusb_dma_controller_destroy()
536 static int tusb_omap_allocate_dma_pool(struct tusb_omap_dma *tusb_dma) in tusb_omap_allocate_dma_pool() argument
538 struct musb *musb = tusb_dma->controller.musb; in tusb_omap_allocate_dma_pool()
543 struct tusb_dma_data *dma_data = &tusb_dma->dma_pool[i]; in tusb_omap_allocate_dma_pool()
550 if (i == 0 || tusb_dma->multichannel) { in tusb_omap_allocate_dma_pool()
573 struct tusb_dma_data *dma_data = &tusb_dma->dma_pool[i]; in tusb_omap_allocate_dma_pool()
586 struct tusb_omap_dma *tusb_dma; in tusb_dma_controller_create() local
599 tusb_dma = kzalloc(sizeof(struct tusb_omap_dma), GFP_KERNEL); in tusb_dma_controller_create()
600 if (!tusb_dma) in tusb_dma_controller_create()
603 tusb_dma->controller.musb = musb; in tusb_dma_controller_create()
604 tusb_dma->tbase = musb->ctrl_base; in tusb_dma_controller_create()
606 tusb_dma->controller.channel_alloc = tusb_omap_dma_allocate; in tusb_dma_controller_create()
607 tusb_dma->controller.channel_release = tusb_omap_dma_release; in tusb_dma_controller_create()
608 tusb_dma->controller.channel_program = tusb_omap_dma_program; in tusb_dma_controller_create()
609 tusb_dma->controller.channel_abort = tusb_omap_dma_abort; in tusb_dma_controller_create()
612 tusb_dma->multichannel = 1; in tusb_dma_controller_create()
632 if (tusb_omap_allocate_dma_pool(tusb_dma)) in tusb_dma_controller_create()
635 return &tusb_dma->controller; in tusb_dma_controller_create()
638 musb_dma_controller_destroy(&tusb_dma->controller); in tusb_dma_controller_create()