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()
296 struct tsi721_bdma_chan *bdma_chan = ptr; in tsi721_bdma_msix() local
298 if (bdma_chan->active) in tsi721_bdma_msix()
299 tasklet_hi_schedule(&bdma_chan->tasklet); in tsi721_bdma_msix()
305 static void tsi721_start_dma(struct tsi721_bdma_chan *bdma_chan) in tsi721_start_dma() argument
307 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_start_dma()
308 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_start_dma()
310 bdma_chan->id); in tsi721_start_dma()
314 if (bdma_chan->wr_count == bdma_chan->wr_count_next) { in tsi721_start_dma()
315 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_start_dma()
317 bdma_chan->id, task_pid_nr(current)); in tsi721_start_dma()
321 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d (wrc=%d) %d", in tsi721_start_dma()
322 bdma_chan->id, bdma_chan->wr_count_next, in tsi721_start_dma()
325 iowrite32(bdma_chan->wr_count_next, in tsi721_start_dma()
326 bdma_chan->regs + TSI721_DMAC_DWRCNT); in tsi721_start_dma()
327 ioread32(bdma_chan->regs + TSI721_DMAC_DWRCNT); in tsi721_start_dma()
329 bdma_chan->wr_count = bdma_chan->wr_count_next; in tsi721_start_dma()
374 static void tsi721_dma_tx_err(struct tsi721_bdma_chan *bdma_chan, in tsi721_dma_tx_err() argument
381 list_move(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tx_err()
387 static void tsi721_clr_stat(struct tsi721_bdma_chan *bdma_chan) in tsi721_clr_stat() argument
394 srd_ptr = bdma_chan->sts_rdptr; in tsi721_clr_stat()
395 sts_ptr = bdma_chan->sts_base; in tsi721_clr_stat()
402 srd_ptr %= bdma_chan->sts_size; in tsi721_clr_stat()
406 iowrite32(srd_ptr, bdma_chan->regs + TSI721_DMAC_DSRP); in tsi721_clr_stat()
407 bdma_chan->sts_rdptr = srd_ptr; in tsi721_clr_stat()
414 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_submit_sg() local
427 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_submit_sg()
429 bdma_chan->id); in tsi721_submit_sg()
442 rd_idx = ioread32(bdma_chan->regs + TSI721_DMAC_DRDCNT); in tsi721_submit_sg()
443 rd_idx %= (bdma_chan->bd_num + 1); in tsi721_submit_sg()
445 idx = bdma_chan->wr_count_next % (bdma_chan->bd_num + 1); in tsi721_submit_sg()
446 if (idx == bdma_chan->bd_num) { in tsi721_submit_sg()
453 bdma_chan->id, rd_idx, idx); in tsi721_submit_sg()
458 bdma_chan->id, i, desc->sg_len, in tsi721_submit_sg()
463 bdma_chan->id, i); in tsi721_submit_sg()
481 bdma_chan->id, bcount); in tsi721_submit_sg()
489 bdma_chan->id, i); in tsi721_submit_sg()
495 bd_ptr = &((struct tsi721_dma_desc *)bdma_chan->bd_base)[idx]; in tsi721_submit_sg()
503 bdma_chan->id, bd_ptr, desc->destid, desc->rio_addr); in tsi721_submit_sg()
509 if (++idx == bdma_chan->bd_num) { in tsi721_submit_sg()
520 bdma_chan->id, bcount); in tsi721_submit_sg()
529 bdma_chan->wr_count_next += add_count; in tsi721_submit_sg()
534 static void tsi721_advance_work(struct tsi721_bdma_chan *bdma_chan, in tsi721_advance_work() argument
539 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d", bdma_chan->id); in tsi721_advance_work()
541 if (!tsi721_dma_is_idle(bdma_chan)) in tsi721_advance_work()
548 if (!desc && !bdma_chan->active_tx && !list_empty(&bdma_chan->queue)) { in tsi721_advance_work()
549 desc = list_first_entry(&bdma_chan->queue, in tsi721_advance_work()
552 bdma_chan->active_tx = desc; in tsi721_advance_work()
558 tsi721_start_dma(bdma_chan); in tsi721_advance_work()
560 tsi721_dma_tx_err(bdma_chan, desc); in tsi721_advance_work()
561 tsi_debug(DMA, &bdma_chan->dchan.dev->device, in tsi721_advance_work()
563 bdma_chan->id, err); in tsi721_advance_work()
567 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d Exit", in tsi721_advance_work()
568 bdma_chan->id); in tsi721_advance_work()
573 struct tsi721_bdma_chan *bdma_chan = (struct tsi721_bdma_chan *)data; in tsi721_dma_tasklet() local
576 dmac_int = ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
577 tsi_debug(DMA, &bdma_chan->dchan.dev->device, "DMAC%d_INT = 0x%x", in tsi721_dma_tasklet()
578 bdma_chan->id, dmac_int); in tsi721_dma_tasklet()
580 iowrite32(dmac_int, bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
586 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
587 dmac_sts = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_dma_tasklet()
588 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
590 bdma_chan->id, dmac_sts, desc->destid, desc->rio_addr); in tsi721_dma_tasklet()
597 tsi721_clr_stat(bdma_chan); in tsi721_dma_tasklet()
599 spin_lock(&bdma_chan->lock); in tsi721_dma_tasklet()
603 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_dma_tasklet()
606 dmac_sts = ioread32(bdma_chan->regs + TSI721_DMAC_STS); in tsi721_dma_tasklet()
611 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
612 "Failed to re-initiate DMAC%d", bdma_chan->id); in tsi721_dma_tasklet()
613 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
618 iowrite32(((u64)bdma_chan->bd_phys >> 32), in tsi721_dma_tasklet()
619 bdma_chan->regs + TSI721_DMAC_DPTRH); in tsi721_dma_tasklet()
620 iowrite32(((u64)bdma_chan->bd_phys & TSI721_DMAC_DPTRL_MASK), in tsi721_dma_tasklet()
621 bdma_chan->regs + TSI721_DMAC_DPTRL); in tsi721_dma_tasklet()
624 iowrite32(((u64)bdma_chan->sts_phys >> 32), in tsi721_dma_tasklet()
625 bdma_chan->regs + TSI721_DMAC_DSBH); in tsi721_dma_tasklet()
626 iowrite32(((u64)bdma_chan->sts_phys & TSI721_DMAC_DSBL_MASK), in tsi721_dma_tasklet()
627 bdma_chan->regs + TSI721_DMAC_DSBL); in tsi721_dma_tasklet()
628 iowrite32(TSI721_DMAC_DSSZ_SIZE(bdma_chan->sts_size), in tsi721_dma_tasklet()
629 bdma_chan->regs + TSI721_DMAC_DSSZ); in tsi721_dma_tasklet()
633 bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
635 ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_dma_tasklet()
637 bdma_chan->wr_count = bdma_chan->wr_count_next = 0; in tsi721_dma_tasklet()
638 bdma_chan->sts_rdptr = 0; in tsi721_dma_tasklet()
641 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
644 list_add(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tasklet()
645 bdma_chan->active_tx = NULL; in tsi721_dma_tasklet()
646 if (bdma_chan->active) in tsi721_dma_tasklet()
647 tsi721_advance_work(bdma_chan, NULL); in tsi721_dma_tasklet()
648 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
652 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_dma_tasklet()
654 bdma_chan->id); in tsi721_dma_tasklet()
660 tsi721_clr_stat(bdma_chan); in tsi721_dma_tasklet()
661 spin_lock(&bdma_chan->lock); in tsi721_dma_tasklet()
662 desc = bdma_chan->active_tx; in tsi721_dma_tasklet()
674 list_add(&desc->desc_node, &bdma_chan->free_list); in tsi721_dma_tasklet()
675 bdma_chan->active_tx = NULL; in tsi721_dma_tasklet()
676 if (bdma_chan->active) in tsi721_dma_tasklet()
677 tsi721_advance_work(bdma_chan, NULL); in tsi721_dma_tasklet()
678 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
682 if (bdma_chan->active) in tsi721_dma_tasklet()
683 tsi721_advance_work(bdma_chan, in tsi721_dma_tasklet()
684 bdma_chan->active_tx); in tsi721_dma_tasklet()
685 spin_unlock(&bdma_chan->lock); in tsi721_dma_tasklet()
690 iowrite32(TSI721_DMAC_INT_ALL, bdma_chan->regs + TSI721_DMAC_INTE); in tsi721_dma_tasklet()
696 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(txd->chan); in tsi721_tx_submit() local
701 tsi_err(&bdma_chan->dchan.dev->device, in tsi721_tx_submit()
703 bdma_chan->id, txd); in tsi721_tx_submit()
707 spin_lock_bh(&bdma_chan->lock); in tsi721_tx_submit()
709 if (!bdma_chan->active) { in tsi721_tx_submit()
710 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_submit()
716 list_add_tail(&desc->desc_node, &bdma_chan->queue); in tsi721_tx_submit()
717 tsi721_advance_work(bdma_chan, NULL); in tsi721_tx_submit()
719 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_submit()
725 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_alloc_chan_resources() local
729 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_alloc_chan_resources()
731 if (bdma_chan->bd_base) in tsi721_alloc_chan_resources()
735 if (tsi721_bdma_ch_init(bdma_chan, dma_desc_per_channel)) { in tsi721_alloc_chan_resources()
737 bdma_chan->id); in tsi721_alloc_chan_resources()
745 tsi721_bdma_ch_free(bdma_chan); in tsi721_alloc_chan_resources()
749 bdma_chan->tx_desc = desc; in tsi721_alloc_chan_resources()
755 list_add(&desc[i].desc_node, &bdma_chan->free_list); in tsi721_alloc_chan_resources()
760 bdma_chan->active = true; in tsi721_alloc_chan_resources()
761 tsi721_bdma_interrupt_enable(bdma_chan, 1); in tsi721_alloc_chan_resources()
766 static void tsi721_sync_dma_irq(struct tsi721_bdma_chan *bdma_chan) in tsi721_sync_dma_irq() argument
768 struct tsi721_device *priv = to_tsi721(bdma_chan->dchan.device); in tsi721_sync_dma_irq()
773 bdma_chan->id].vector); in tsi721_sync_dma_irq()
775 bdma_chan->id].vector); in tsi721_sync_dma_irq()
783 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_free_chan_resources() local
785 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_free_chan_resources()
787 if (!bdma_chan->bd_base) in tsi721_free_chan_resources()
790 tsi721_bdma_interrupt_enable(bdma_chan, 0); in tsi721_free_chan_resources()
791 bdma_chan->active = false; in tsi721_free_chan_resources()
792 tsi721_sync_dma_irq(bdma_chan); in tsi721_free_chan_resources()
793 tasklet_kill(&bdma_chan->tasklet); in tsi721_free_chan_resources()
794 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_free_chan_resources()
795 kfree(bdma_chan->tx_desc); in tsi721_free_chan_resources()
796 tsi721_bdma_ch_free(bdma_chan); in tsi721_free_chan_resources()
803 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_tx_status() local
806 spin_lock_bh(&bdma_chan->lock); in tsi721_tx_status()
808 spin_unlock_bh(&bdma_chan->lock); in tsi721_tx_status()
814 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_issue_pending() local
816 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_issue_pending()
818 spin_lock_bh(&bdma_chan->lock); in tsi721_issue_pending()
819 if (tsi721_dma_is_idle(bdma_chan) && bdma_chan->active) { in tsi721_issue_pending()
820 tsi721_advance_work(bdma_chan, NULL); in tsi721_issue_pending()
822 spin_unlock_bh(&bdma_chan->lock); in tsi721_issue_pending()
831 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_prep_rio_sg() local
839 bdma_chan->id); in tsi721_prep_rio_sg()
843 tsi_debug(DMA, &dchan->dev->device, "DMAC%d %s", bdma_chan->id, in tsi721_prep_rio_sg()
864 bdma_chan->id); in tsi721_prep_rio_sg()
868 spin_lock_bh(&bdma_chan->lock); in tsi721_prep_rio_sg()
870 if (!list_empty(&bdma_chan->free_list)) { in tsi721_prep_rio_sg()
871 desc = list_first_entry(&bdma_chan->free_list, in tsi721_prep_rio_sg()
884 spin_unlock_bh(&bdma_chan->lock); in tsi721_prep_rio_sg()
888 "DMAC%d free TXD is not available", bdma_chan->id); in tsi721_prep_rio_sg()
897 struct tsi721_bdma_chan *bdma_chan = to_tsi721_chan(dchan); in tsi721_terminate_all() local
901 tsi_debug(DMA, &dchan->dev->device, "DMAC%d", bdma_chan->id); in tsi721_terminate_all()
903 spin_lock_bh(&bdma_chan->lock); in tsi721_terminate_all()
905 bdma_chan->active = false; in tsi721_terminate_all()
907 while (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_terminate_all()
913 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_terminate_all()
917 dmac_int = ioread32(bdma_chan->regs + TSI721_DMAC_INT); in tsi721_terminate_all()
922 if (bdma_chan->active_tx) in tsi721_terminate_all()
923 list_add(&bdma_chan->active_tx->desc_node, &list); in tsi721_terminate_all()
924 list_splice_init(&bdma_chan->queue, &list); in tsi721_terminate_all()
927 tsi721_dma_tx_err(bdma_chan, desc); in tsi721_terminate_all()
929 spin_unlock_bh(&bdma_chan->lock); in tsi721_terminate_all()
934 static void tsi721_dma_stop(struct tsi721_bdma_chan *bdma_chan) in tsi721_dma_stop() argument
936 if (!bdma_chan->active) in tsi721_dma_stop()
938 spin_lock_bh(&bdma_chan->lock); in tsi721_dma_stop()
939 if (!tsi721_dma_is_idle(bdma_chan)) { in tsi721_dma_stop()
944 bdma_chan->regs + TSI721_DMAC_CTL); in tsi721_dma_stop()
947 while (!tsi721_dma_is_idle(bdma_chan) && --timeout) in tsi721_dma_stop()
951 spin_unlock_bh(&bdma_chan->lock); in tsi721_dma_stop()
974 struct tsi721_bdma_chan *bdma_chan = &priv->bdma[i]; in tsi721_register_dma() local
979 bdma_chan->regs = priv->regs + TSI721_DMAC_BASE(i); in tsi721_register_dma()
981 bdma_chan->dchan.device = &mport->dma; in tsi721_register_dma()
982 bdma_chan->dchan.cookie = 1; in tsi721_register_dma()
983 bdma_chan->dchan.chan_id = i; in tsi721_register_dma()
984 bdma_chan->id = i; in tsi721_register_dma()
985 bdma_chan->active = false; in tsi721_register_dma()
987 spin_lock_init(&bdma_chan->lock); in tsi721_register_dma()
989 bdma_chan->active_tx = NULL; in tsi721_register_dma()
990 INIT_LIST_HEAD(&bdma_chan->queue); in tsi721_register_dma()
991 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_register_dma()
993 tasklet_init(&bdma_chan->tasklet, tsi721_dma_tasklet, in tsi721_register_dma()
994 (unsigned long)bdma_chan); in tsi721_register_dma()
995 list_add_tail(&bdma_chan->dchan.device_node, in tsi721_register_dma()
1024 struct tsi721_bdma_chan *bdma_chan; in tsi721_unregister_dma() local
1031 bdma_chan = to_tsi721_chan(chan); in tsi721_unregister_dma()
1032 if (bdma_chan->active) { in tsi721_unregister_dma()
1033 tsi721_bdma_interrupt_enable(bdma_chan, 0); in tsi721_unregister_dma()
1034 bdma_chan->active = false; in tsi721_unregister_dma()
1035 tsi721_sync_dma_irq(bdma_chan); in tsi721_unregister_dma()
1036 tasklet_kill(&bdma_chan->tasklet); in tsi721_unregister_dma()
1037 INIT_LIST_HEAD(&bdma_chan->free_list); in tsi721_unregister_dma()
1038 kfree(bdma_chan->tx_desc); in tsi721_unregister_dma()
1039 tsi721_bdma_ch_free(bdma_chan); in tsi721_unregister_dma()