Lines Matching refs:tusb_dma

40 	struct tusb_omap_dma	*tusb_dma;  member
64 struct tusb_omap_dma *tusb_dma; in tusb_omap_dma_start() local
66 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in tusb_omap_dma_start()
75 struct tusb_omap_dma *tusb_dma; in tusb_omap_dma_stop() local
77 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in tusb_omap_dma_stop()
127 struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; in tusb_omap_dma_cb() local
138 if (tusb_dma->multichannel) in tusb_omap_dma_cb()
141 ch = tusb_dma->ch; in tusb_omap_dma_cb()
190 if (!tusb_dma->multichannel) in tusb_omap_dma_cb()
228 struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; in tusb_omap_dma_program() local
280 if (tusb_dma->multichannel) { in tusb_omap_dma_program()
289 if (tusb_dma->ch < 0) { in tusb_omap_dma_program()
297 ch = tusb_dma->ch; in tusb_omap_dma_program()
298 dmareq = tusb_dma->dmareq; in tusb_omap_dma_program()
299 sync_dev = tusb_dma->sync_dev; in tusb_omap_dma_program()
430 struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; in tusb_omap_dma_abort() local
432 if (!tusb_dma->multichannel) { in tusb_omap_dma_abort()
433 if (tusb_dma->ch >= 0) { in tusb_omap_dma_abort()
434 omap_stop_dma(tusb_dma->ch); in tusb_omap_dma_abort()
435 omap_free_dma(tusb_dma->ch); in tusb_omap_dma_abort()
436 tusb_dma->ch = -1; in tusb_omap_dma_abort()
439 tusb_dma->dmareq = -1; in tusb_omap_dma_abort()
440 tusb_dma->sync_dev = -1; in tusb_omap_dma_abort()
508 struct tusb_omap_dma *tusb_dma; in tusb_omap_dma_allocate() local
515 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in tusb_omap_dma_allocate()
516 musb = tusb_dma->musb; in tusb_omap_dma_allocate()
553 chdat->musb = tusb_dma->musb; in tusb_omap_dma_allocate()
554 chdat->tbase = tusb_dma->tbase; in tusb_omap_dma_allocate()
559 chdat->tusb_dma = tusb_dma; in tusb_omap_dma_allocate()
565 if (tusb_dma->multichannel) { in tusb_omap_dma_allocate()
574 } else if (tusb_dma->ch == -1) { in tusb_omap_dma_allocate()
575 tusb_dma->dmareq = 0; in tusb_omap_dma_allocate()
576 tusb_dma->sync_dev = OMAP24XX_DMA_EXT_DMAREQ0; in tusb_omap_dma_allocate()
579 ret = omap_request_dma(tusb_dma->sync_dev, "TUSB shared", in tusb_omap_dma_allocate()
580 tusb_omap_dma_cb, NULL, &tusb_dma->ch); in tusb_omap_dma_allocate()
592 chdat->ch >= 0 ? chdat->ch : tusb_dma->ch, in tusb_omap_dma_allocate()
593 chdat->dmareq >= 0 ? chdat->dmareq : tusb_dma->dmareq, in tusb_omap_dma_allocate()
594 chdat->sync_dev >= 0 ? chdat->sync_dev : tusb_dma->sync_dev); in tusb_omap_dma_allocate()
646 struct tusb_omap_dma *tusb_dma; in dma_controller_destroy() local
649 tusb_dma = container_of(c, struct tusb_omap_dma, controller); in dma_controller_destroy()
658 if (tusb_dma && !tusb_dma->multichannel && tusb_dma->ch >= 0) in dma_controller_destroy()
659 omap_free_dma(tusb_dma->ch); in dma_controller_destroy()
661 kfree(tusb_dma); in dma_controller_destroy()
668 struct tusb_omap_dma *tusb_dma; in dma_controller_create() local
681 tusb_dma = kzalloc(sizeof(struct tusb_omap_dma), GFP_KERNEL); in dma_controller_create()
682 if (!tusb_dma) in dma_controller_create()
685 tusb_dma->musb = musb; in dma_controller_create()
686 tusb_dma->tbase = musb->ctrl_base; in dma_controller_create()
688 tusb_dma->ch = -1; in dma_controller_create()
689 tusb_dma->dmareq = -1; in dma_controller_create()
690 tusb_dma->sync_dev = -1; in dma_controller_create()
692 tusb_dma->controller.start = tusb_omap_dma_start; in dma_controller_create()
693 tusb_dma->controller.stop = tusb_omap_dma_stop; in dma_controller_create()
694 tusb_dma->controller.channel_alloc = tusb_omap_dma_allocate; in dma_controller_create()
695 tusb_dma->controller.channel_release = tusb_omap_dma_release; in dma_controller_create()
696 tusb_dma->controller.channel_program = tusb_omap_dma_program; in dma_controller_create()
697 tusb_dma->controller.channel_abort = tusb_omap_dma_abort; in dma_controller_create()
700 tusb_dma->multichannel = 1; in dma_controller_create()
720 return &tusb_dma->controller; in dma_controller_create()
723 dma_controller_destroy(&tusb_dma->controller); in dma_controller_create()