Lines Matching refs:bdma_chan
63 static int tsi721_bdma_ch_init(struct tsi721_bdma_chan *bdma_chan, int bd_num) in tsi721_bdma_ch_init() argument
66 struct device *dev = bdma_chan->dchan.device->dev; in tsi721_bdma_ch_init()
72 struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); in tsi721_bdma_ch_init()
75 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d", bdma_chan->id); in tsi721_bdma_ch_init()
87 bdma_chan->bd_num = bd_num; in tsi721_bdma_ch_init()
88 bdma_chan->bd_phys = bd_phys; in tsi721_bdma_ch_init()
89 bdma_chan->bd_base = bd_ptr; in tsi721_bdma_ch_init()
91 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_bdma_ch_init()
93 bdma_chan->id, bd_ptr, &bd_phys); in tsi721_bdma_ch_init()
107 bdma_chan->bd_base = NULL; in tsi721_bdma_ch_init()
111 bdma_chan->sts_phys = sts_phys; in tsi721_bdma_ch_init()
112 bdma_chan->sts_base = sts_ptr; in tsi721_bdma_ch_init()
113 bdma_chan->sts_size = sts_size; in tsi721_bdma_ch_init()
115 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_bdma_ch_init()
117 bdma_chan->id, sts_ptr, &sts_phys, sts_size); in tsi721_bdma_ch_init()
127 bdma_chan->regs + TSI721_DMAC_DPTRH); in tsi721_bdma_ch_init()
129 bdma_chan->regs + TSI721_DMAC_DPTRL); in tsi721_bdma_ch_init()
133 bdma_chan->regs + TSI721_DMAC_DSBH); in tsi721_bdma_ch_init()
135 bdma_chan->regs + TSI721_DMAC_DSBL); in tsi721_bdma_ch_init()
137 bdma_chan->regs + TSI721_DMAC_DSSZ); in tsi721_bdma_ch_init()
141 bdma_chan->regs + TSI721_DMAC_INT); in tsi721_bdma_ch_init()
143 ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_bdma_ch_init()
150 idx = TSI721_VECT_DMA0_DONE + bdma_chan->id; in tsi721_bdma_ch_init()
153 priv->msix[idx].irq_name, (void *)bdma_chan); in tsi721_bdma_ch_init()
156 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_bdma_ch_init()
158 bdma_chan->id); in tsi721_bdma_ch_init()
162 idx = TSI721_VECT_DMA0_INT + bdma_chan->id; in tsi721_bdma_ch_init()
165 priv->msix[idx].irq_name, (void *)bdma_chan); in tsi721_bdma_ch_init()
168 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_bdma_ch_init()
170 bdma_chan->id); in tsi721_bdma_ch_init()
173 bdma_chan->id].vector, in tsi721_bdma_ch_init()
174 (void *)bdma_chan); in tsi721_bdma_ch_init()
183 bdma_chan->bd_base = NULL; in tsi721_bdma_ch_init()
189 bdma_chan->sts_base = NULL; in tsi721_bdma_ch_init()
197 iowrite32(TSI721_DMAC_CTL_INIT, bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_bdma_ch_init()
198 ioread32(bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_bdma_ch_init()
199 bdma_chan->wr_count = bdma_chan->wr_count_next = 0; in tsi721_bdma_ch_init()
200 bdma_chan->sts_rdptr = 0; in tsi721_bdma_ch_init()
206 static int tsi721_bdma_ch_free(struct tsi721_bdma_chan *bdma_chan) in tsi721_bdma_ch_free() argument
210 struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); in tsi721_bdma_ch_free()
213 if (!bdma_chan->bd_base) in tsi721_bdma_ch_free()
217 ch_stat = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_bdma_ch_free()
222 iowrite32(TSI721_DMAC_CTL_INIT, bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_bdma_ch_free()
227 bdma_chan->id].vector, (void *)bdma_chan); in tsi721_bdma_ch_free()
229 bdma_chan->id].vector, (void *)bdma_chan); in tsi721_bdma_ch_free()
234 dma_free_coherent(bdma_chan->dchan.device->dev, in tsi721_bdma_ch_free()
235 (bdma_chan->bd_num + 1) * sizeof(struct tsi721_dma_desc), in tsi721_bdma_ch_free()
236 bdma_chan->bd_base, bdma_chan->bd_phys); in tsi721_bdma_ch_free()
237 bdma_chan->bd_base = NULL; in tsi721_bdma_ch_free()
240 dma_free_coherent(bdma_chan->dchan.device->dev, in tsi721_bdma_ch_free()
241 bdma_chan->sts_size * sizeof(struct tsi721_dma_sts), in tsi721_bdma_ch_free()
242 bdma_chan->sts_base, bdma_chan->sts_phys); in tsi721_bdma_ch_free()
243 bdma_chan->sts_base = NULL; in tsi721_bdma_ch_free()
248 tsi721_bdma_interrupt_enable(struct tsi721_bdma_chan *bdma_chan, int enable) in tsi721_bdma_interrupt_enable() argument
253 bdma_chan->regs + TSI721_DMAC_INT); in tsi721_bdma_interrupt_enable()
254 ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_bdma_interrupt_enable()
257 bdma_chan->regs + TSI721_DMAC_INTE); in tsi721_bdma_interrupt_enable()
260 iowrite32(0, bdma_chan->regs + TSI721_DMAC_INTE); in tsi721_bdma_interrupt_enable()
263 bdma_chan->regs + TSI721_DMAC_INT); in tsi721_bdma_interrupt_enable()
268 static bool tsi721_dma_is_idle(struct tsi721_bdma_chan *bdma_chan) in tsi721_dma_is_idle() argument
272 sts = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_dma_is_idle()
276 void tsi721_bdma_handler(struct tsi721_bdma_chan *bdma_chan) in tsi721_bdma_handler() argument
279 iowrite32(0, bdma_chan->regs + TSI721_DMAC_INTE); in tsi721_bdma_handler()
280 if (bdma_chan->active) in tsi721_bdma_handler()
281 tasklet_hi_schedule(&bdma_chan->tasklet); in tsi721_bdma_handler()
294 struct tsi721_bdma_chan *bdma_chan = ptr; in tsi721_bdma_msix() local
296 if (bdma_chan->active) in tsi721_bdma_msix()
297 tasklet_hi_schedule(&bdma_chan->tasklet); in tsi721_bdma_msix()
303 static void tsi721_start_dma(struct tsi721_bdma_chan *bdma_chan) in tsi721_start_dma() argument
305 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_start_dma()
306 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_start_dma()
308 bdma_chan->id); in tsi721_start_dma()
312 if (bdma_chan->wr_count == bdma_chan->wr_count_next) { in tsi721_start_dma()
313 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_start_dma()
315 bdma_chan->id, task_pid_nr(current)); in tsi721_start_dma()
319 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d (wrc=%d) %d", in tsi721_start_dma()
320 bdma_chan->id, bdma_chan->wr_count_next, in tsi721_start_dma()
323 iowrite32(bdma_chan->wr_count_next, in tsi721_start_dma()
324 bdma_chan->regs + TSI721_DMAC_DWRCNT); in tsi721_start_dma()
325 ioread32(bdma_chan->regs + TSI721_DMAC_DWRCNT); in tsi721_start_dma()
327 bdma_chan->wr_count = bdma_chan->wr_count_next; in tsi721_start_dma()
372 static void tsi721_dma_tx_err(struct tsi721_bdma_chan *bdma_chan, in tsi721_dma_tx_err() argument
379 list_move(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tx_err()
385 static void tsi721_clr_stat(struct tsi721_bdma_chan *bdma_chan) in tsi721_clr_stat() argument
392 srd_ptr = bdma_chan->sts_rdptr; in tsi721_clr_stat()
393 sts_ptr = bdma_chan->sts_base; in tsi721_clr_stat()
400 srd_ptr %= bdma_chan->sts_size; in tsi721_clr_stat()
404 iowrite32(srd_ptr, bdma_chan->regs + TSI721_DMAC_DSRP); in tsi721_clr_stat()
405 bdma_chan->sts_rdptr = srd_ptr; in tsi721_clr_stat()
412 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_submit_sg() local
425 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_submit_sg()
427 bdma_chan->id); in tsi721_submit_sg()
440 rd_idx = ioread32(bdma_chan->regs + TSI721_DMAC_DRDCNT); in tsi721_submit_sg()
441 rd_idx %= (bdma_chan->bd_num + 1); in tsi721_submit_sg()
443 idx = bdma_chan->wr_count_next % (bdma_chan->bd_num + 1); in tsi721_submit_sg()
444 if (idx == bdma_chan->bd_num) { in tsi721_submit_sg()
451 bdma_chan->id, rd_idx, idx); in tsi721_submit_sg()
456 bdma_chan->id, i, desc->sg_len, in tsi721_submit_sg()
461 bdma_chan->id, i); in tsi721_submit_sg()
479 bdma_chan->id, bcount); in tsi721_submit_sg()
487 bdma_chan->id, i); in tsi721_submit_sg()
493 bd_ptr = &((struct tsi721_dma_desc *)bdma_chan->bd_base)[idx]; in tsi721_submit_sg()
501 bdma_chan->id, bd_ptr, desc->destid, desc->rio_addr); in tsi721_submit_sg()
507 if (++idx == bdma_chan->bd_num) { in tsi721_submit_sg()
518 bdma_chan->id, bcount); in tsi721_submit_sg()
527 bdma_chan->wr_count_next += add_count; in tsi721_submit_sg()
532 static void tsi721_advance_work(struct tsi721_bdma_chan *bdma_chan, in tsi721_advance_work() argument
537 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d", bdma_chan->id); in tsi721_advance_work()
539 if (!tsi721_dma_is_idle(bdma_chan)) in tsi721_advance_work()
546 if (!desc && !bdma_chan->active_tx && !list_empty(&bdma_chan->queue)) { in tsi721_advance_work()
547 desc = list_first_entry(&bdma_chan->queue, in tsi721_advance_work()
550 bdma_chan->active_tx = desc; in tsi721_advance_work()
556 tsi721_start_dma(bdma_chan); in tsi721_advance_work()
558 tsi721_dma_tx_err(bdma_chan, desc); in tsi721_advance_work()
559 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_advance_work()
561 bdma_chan->id, err); in tsi721_advance_work()
565 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d Exit", in tsi721_advance_work()
566 bdma_chan->id); in tsi721_advance_work()
571 struct tsi721_bdma_chan *bdma_chan = (struct tsi721_bdma_chan *)data; in tsi721_dma_tasklet() local
574 dmac_int = ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
575 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d_INT = 0x%x", in tsi721_dma_tasklet()
576 bdma_chan->id, dmac_int); in tsi721_dma_tasklet()
578 iowrite32(dmac_int, bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
584 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
585 dmac_sts = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_dma_tasklet()
586 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
588 bdma_chan->id, dmac_sts, desc->destid, desc->rio_addr); in tsi721_dma_tasklet()
595 tsi721_clr_stat(bdma_chan); in tsi721_dma_tasklet()
597 spin_lock(&bdma_chan->lock); in tsi721_dma_tasklet()
601 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_dma_tasklet()
604 dmac_sts = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_dma_tasklet()
609 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
610 "Failed to re-initiate DMAC%d", bdma_chan->id); in tsi721_dma_tasklet()
611 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
616 iowrite32(((u64)bdma_chan->bd_phys >> 32), in tsi721_dma_tasklet()
617 bdma_chan->regs + TSI721_DMAC_DPTRH); in tsi721_dma_tasklet()
618 iowrite32(((u64)bdma_chan->bd_phys & TSI721_DMAC_DPTRL_MASK), in tsi721_dma_tasklet()
619 bdma_chan->regs + TSI721_DMAC_DPTRL); in tsi721_dma_tasklet()
622 iowrite32(((u64)bdma_chan->sts_phys >> 32), in tsi721_dma_tasklet()
623 bdma_chan->regs + TSI721_DMAC_DSBH); in tsi721_dma_tasklet()
624 iowrite32(((u64)bdma_chan->sts_phys & TSI721_DMAC_DSBL_MASK), in tsi721_dma_tasklet()
625 bdma_chan->regs + TSI721_DMAC_DSBL); in tsi721_dma_tasklet()
626 iowrite32(TSI721_DMAC_DSSZ_SIZE(bdma_chan->sts_size), in tsi721_dma_tasklet()
627 bdma_chan->regs + TSI721_DMAC_DSSZ); in tsi721_dma_tasklet()
631 bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
633 ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
635 bdma_chan->wr_count = bdma_chan->wr_count_next = 0; in tsi721_dma_tasklet()
636 bdma_chan->sts_rdptr = 0; in tsi721_dma_tasklet()
639 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
642 list_add(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tasklet()
643 bdma_chan->active_tx = NULL; in tsi721_dma_tasklet()
644 if (bdma_chan->active) in tsi721_dma_tasklet()
645 tsi721_advance_work(bdma_chan, NULL); in tsi721_dma_tasklet()
646 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
650 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
652 bdma_chan->id); in tsi721_dma_tasklet()
658 tsi721_clr_stat(bdma_chan); in tsi721_dma_tasklet()
659 spin_lock(&bdma_chan->lock); in tsi721_dma_tasklet()
660 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
672 list_add(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tasklet()
673 bdma_chan->active_tx = NULL; in tsi721_dma_tasklet()
674 if (bdma_chan->active) in tsi721_dma_tasklet()
675 tsi721_advance_work(bdma_chan, NULL); in tsi721_dma_tasklet()
676 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
680 if (bdma_chan->active) in tsi721_dma_tasklet()
681 tsi721_advance_work(bdma_chan, in tsi721_dma_tasklet()
682 bdma_chan->active_tx); in tsi721_dma_tasklet()
683 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
688 iowrite32(TSI721_DMAC_INT_ALL, bdma_chan->regs + TSI721_DMAC_INTE); in tsi721_dma_tasklet()
694 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(txd->chan); in tsi721_tx_submit() local
699 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_tx_submit()
701 bdma_chan->id, txd); in tsi721_tx_submit()
705 spin_lock_bh(&bdma_chan->lock); in tsi721_tx_submit()
707 if (!bdma_chan->active) { in tsi721_tx_submit()
708 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_submit()
714 list_add_tail(&desc->desc_node, &bdma_chan->queue); in tsi721_tx_submit()
715 tsi721_advance_work(bdma_chan, NULL); in tsi721_tx_submit()
717 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_submit()
723 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_alloc_chan_resources() local
727 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_alloc_chan_resources()
729 if (bdma_chan->bd_base) in tsi721_alloc_chan_resources()
733 if (tsi721_bdma_ch_init(bdma_chan, dma_desc_per_channel)) { in tsi721_alloc_chan_resources()
735 bdma_chan->id); in tsi721_alloc_chan_resources()
743 tsi721_bdma_ch_free(bdma_chan); in tsi721_alloc_chan_resources()
747 bdma_chan->tx_desc = desc; in tsi721_alloc_chan_resources()
753 list_add(&desc[i].desc_node, &bdma_chan->free_list); in tsi721_alloc_chan_resources()
758 bdma_chan->active = true; in tsi721_alloc_chan_resources()
759 tsi721_bdma_interrupt_enable(bdma_chan, 1); in tsi721_alloc_chan_resources()
764 static void tsi721_sync_dma_irq(struct tsi721_bdma_chan *bdma_chan) in tsi721_sync_dma_irq() argument
766 struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); in tsi721_sync_dma_irq()
771 bdma_chan->id].vector); in tsi721_sync_dma_irq()
773 bdma_chan->id].vector); in tsi721_sync_dma_irq()
781 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_free_chan_resources() local
783 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_free_chan_resources()
785 if (!bdma_chan->bd_base) in tsi721_free_chan_resources()
788 tsi721_bdma_interrupt_enable(bdma_chan, 0); in tsi721_free_chan_resources()
789 bdma_chan->active = false; in tsi721_free_chan_resources()
790 tsi721_sync_dma_irq(bdma_chan); in tsi721_free_chan_resources()
791 tasklet_kill(&bdma_chan->tasklet); in tsi721_free_chan_resources()
792 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_free_chan_resources()
793 kfree(bdma_chan->tx_desc); in tsi721_free_chan_resources()
794 tsi721_bdma_ch_free(bdma_chan); in tsi721_free_chan_resources()
801 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_tx_status() local
804 spin_lock_bh(&bdma_chan->lock); in tsi721_tx_status()
806 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_status()
812 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_issue_pending() local
814 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_issue_pending()
816 spin_lock_bh(&bdma_chan->lock); in tsi721_issue_pending()
817 if (tsi721_dma_is_idle(bdma_chan) && bdma_chan->active) { in tsi721_issue_pending()
818 tsi721_advance_work(bdma_chan, NULL); in tsi721_issue_pending()
820 spin_unlock_bh(&bdma_chan->lock); in tsi721_issue_pending()
829 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_prep_rio_sg() local
837 bdma_chan->id); in tsi721_prep_rio_sg()
841 tsi_debug(DMA, &dchan->dev->device, "DMAC%d %s", bdma_chan->id, in tsi721_prep_rio_sg()
862 bdma_chan->id); in tsi721_prep_rio_sg()
866 spin_lock_bh(&bdma_chan->lock); in tsi721_prep_rio_sg()
868 if (!list_empty(&bdma_chan->free_list)) { in tsi721_prep_rio_sg()
869 desc = list_first_entry(&bdma_chan->free_list, in tsi721_prep_rio_sg()
882 spin_unlock_bh(&bdma_chan->lock); in tsi721_prep_rio_sg()
886 "DMAC%d free TXD is not available", bdma_chan->id); in tsi721_prep_rio_sg()
895 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_terminate_all() local
899 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_terminate_all()
901 spin_lock_bh(&bdma_chan->lock); in tsi721_terminate_all()
903 bdma_chan->active = false; in tsi721_terminate_all()
905 while (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_terminate_all()
911 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_terminate_all()
915 dmac_int = ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_terminate_all()
920 if (bdma_chan->active_tx) in tsi721_terminate_all()
921 list_add(&bdma_chan->active_tx->desc_node, &list); in tsi721_terminate_all()
922 list_splice_init(&bdma_chan->queue, &list); in tsi721_terminate_all()
925 tsi721_dma_tx_err(bdma_chan, desc); in tsi721_terminate_all()
927 spin_unlock_bh(&bdma_chan->lock); in tsi721_terminate_all()
932 static void tsi721_dma_stop(struct tsi721_bdma_chan *bdma_chan) in tsi721_dma_stop() argument
934 if (!bdma_chan->active) in tsi721_dma_stop()
936 spin_lock_bh(&bdma_chan->lock); in tsi721_dma_stop()
937 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_dma_stop()
942 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_dma_stop()
945 while (!tsi721_dma_is_idle(bdma_chan) && --timeout) in tsi721_dma_stop()
949 spin_unlock_bh(&bdma_chan->lock); in tsi721_dma_stop()
972 struct tsi721_bdma_chan *bdma_chan = &priv->bdma[i]; in tsi721_register_dma() local
977 bdma_chan->regs = priv->regs + TSI721_DMAC_BASE(i); in tsi721_register_dma()
979 bdma_chan->dchan.device = &mport->dma; in tsi721_register_dma()
980 bdma_chan->dchan.cookie = 1; in tsi721_register_dma()
981 bdma_chan->dchan.chan_id = i; in tsi721_register_dma()
982 bdma_chan->id = i; in tsi721_register_dma()
983 bdma_chan->active = false; in tsi721_register_dma()
985 spin_lock_init(&bdma_chan->lock); in tsi721_register_dma()
987 bdma_chan->active_tx = NULL; in tsi721_register_dma()
988 INIT_LIST_HEAD(&bdma_chan->queue); in tsi721_register_dma()
989 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_register_dma()
991 tasklet_init(&bdma_chan->tasklet, tsi721_dma_tasklet, in tsi721_register_dma()
992 (unsigned long)bdma_chan); in tsi721_register_dma()
993 list_add_tail(&bdma_chan->dchan.device_node, in tsi721_register_dma()
1022 struct tsi721_bdma_chan *bdma_chan; in tsi721_unregister_dma() local
1029 bdma_chan = to_tsi721_chan(chan); in tsi721_unregister_dma()
1030 if (bdma_chan->active) { in tsi721_unregister_dma()
1031 tsi721_bdma_interrupt_enable(bdma_chan, 0); in tsi721_unregister_dma()
1032 bdma_chan->active = false; in tsi721_unregister_dma()
1033 tsi721_sync_dma_irq(bdma_chan); in tsi721_unregister_dma()
1034 tasklet_kill(&bdma_chan->tasklet); in tsi721_unregister_dma()
1035 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_unregister_dma()
1036 kfree(bdma_chan->tx_desc); in tsi721_unregister_dma()
1037 tsi721_bdma_ch_free(bdma_chan); in tsi721_unregister_dma()