Lines Matching refs:ctp
216 chan_tab_t *ctp; in au1xxx_dbdma_chan_alloc() local
263 ctp = NULL; in au1xxx_dbdma_chan_alloc()
271 ctp = (chan_tab_t *)kmalloc(sizeof(chan_tab_t), GFP_KERNEL); in au1xxx_dbdma_chan_alloc()
272 chan_tab_ptr[i] = ctp; in au1xxx_dbdma_chan_alloc()
273 ctp->chan_index = chan = i; in au1xxx_dbdma_chan_alloc()
279 if (ctp != NULL) { in au1xxx_dbdma_chan_alloc()
280 memset(ctp, 0, sizeof(chan_tab_t)); in au1xxx_dbdma_chan_alloc()
283 ctp->chan_ptr = (au1x_dma_chan_t *)dcp; in au1xxx_dbdma_chan_alloc()
285 ctp->chan_src = stp; in au1xxx_dbdma_chan_alloc()
286 ctp->chan_dest = dtp; in au1xxx_dbdma_chan_alloc()
287 ctp->chan_callback = callback; in au1xxx_dbdma_chan_alloc()
288 ctp->chan_callparam = callparam; in au1xxx_dbdma_chan_alloc()
327 chan_tab_t *ctp; in au1xxx_dbdma_set_devwidth() local
330 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_set_devwidth()
331 stp = ctp->chan_src; in au1xxx_dbdma_set_devwidth()
332 dtp = ctp->chan_dest; in au1xxx_dbdma_set_devwidth()
356 chan_tab_t *ctp; in au1xxx_dbdma_ring_alloc() local
363 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_ring_alloc()
364 stp = ctp->chan_src; in au1xxx_dbdma_ring_alloc()
365 dtp = ctp->chan_dest; in au1xxx_dbdma_ring_alloc()
392 ctp->chan_desc_base = dp; in au1xxx_dbdma_ring_alloc()
508 dp->dscr_nxtptr = DSCR_NXTPTR(virt_to_phys(ctp->chan_desc_base)); in au1xxx_dbdma_ring_alloc()
509 ctp->get_ptr = ctp->put_ptr = ctp->cur_ptr = ctp->chan_desc_base; in au1xxx_dbdma_ring_alloc()
511 return (u32)(ctp->chan_desc_base); in au1xxx_dbdma_ring_alloc()
521 chan_tab_t *ctp; in au1xxx_dbdma_put_source() local
527 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_put_source()
533 dp = ctp->put_ptr; in au1xxx_dbdma_put_source()
547 ctp->chan_ptr->ddma_dbell = 0xffffffff; /* Make it go */ in au1xxx_dbdma_put_source()
551 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_put_source()
565 chan_tab_t *ctp; in au1xxx_dbdma_put_dest() local
571 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_put_dest()
577 dp = ctp->put_ptr; in au1xxx_dbdma_put_dest()
593 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_put_dest()
608 chan_tab_t *ctp; in au1xxx_dbdma_get_dest() local
615 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_get_dest()
621 dp = ctp->get_ptr; in au1xxx_dbdma_get_dest()
637 ctp->get_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_get_dest()
647 chan_tab_t *ctp; in au1xxx_dbdma_stop() local
651 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_stop()
653 cp = ctp->chan_ptr; in au1xxx_dbdma_stop()
676 chan_tab_t *ctp; in au1xxx_dbdma_start() local
679 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_start()
681 cp = ctp->chan_ptr; in au1xxx_dbdma_start()
682 cp->ddma_desptr = virt_to_phys(ctp->cur_ptr); in au1xxx_dbdma_start()
692 chan_tab_t *ctp; in au1xxx_dbdma_reset() local
697 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_reset()
698 ctp->get_ptr = ctp->put_ptr = ctp->cur_ptr = ctp->chan_desc_base; in au1xxx_dbdma_reset()
702 dp = ctp->chan_desc_base; in au1xxx_dbdma_reset()
707 } while (dp != ctp->chan_desc_base); in au1xxx_dbdma_reset()
713 chan_tab_t *ctp; in au1xxx_get_dma_residue() local
717 ctp = *((chan_tab_t **)chanid); in au1xxx_get_dma_residue()
718 cp = ctp->chan_ptr; in au1xxx_get_dma_residue()
731 chan_tab_t *ctp; in au1xxx_dbdma_chan_free() local
734 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_chan_free()
735 stp = ctp->chan_src; in au1xxx_dbdma_chan_free()
736 dtp = ctp->chan_dest; in au1xxx_dbdma_chan_free()
740 if (ctp->chan_desc_base != NULL) in au1xxx_dbdma_chan_free()
741 kfree(ctp->chan_desc_base); in au1xxx_dbdma_chan_free()
745 chan_tab_ptr[ctp->chan_index] = NULL; in au1xxx_dbdma_chan_free()
747 kfree(ctp); in au1xxx_dbdma_chan_free()
755 chan_tab_t *ctp; in dbdma_interrupt() local
763 ctp = chan_tab_ptr[chan_index]; in dbdma_interrupt()
764 cp = ctp->chan_ptr; in dbdma_interrupt()
765 dp = ctp->cur_ptr; in dbdma_interrupt()
772 if (ctp->chan_callback) in dbdma_interrupt()
773 (ctp->chan_callback)(irq, ctp->chan_callparam, regs); in dbdma_interrupt()
775 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in dbdma_interrupt()
795 chan_tab_t *ctp; in au1xxx_dbdma_dump() local
800 ctp = *((chan_tab_t **)chanid); in au1xxx_dbdma_dump()
801 stp = ctp->chan_src; in au1xxx_dbdma_dump()
802 dtp = ctp->chan_dest; in au1xxx_dbdma_dump()
803 cp = ctp->chan_ptr; in au1xxx_dbdma_dump()
806 (u32)ctp, (u32)stp, stp - dbdev_tab, (u32)dtp, dtp - dbdev_tab); in au1xxx_dbdma_dump()
808 (u32)(ctp->chan_desc_base), (u32)(ctp->get_ptr), in au1xxx_dbdma_dump()
809 (u32)(ctp->put_ptr), (u32)(ctp->cur_ptr)); in au1xxx_dbdma_dump()
820 dp = ctp->chan_desc_base; in au1xxx_dbdma_dump()
830 } while (dp != ctp->chan_desc_base); in au1xxx_dbdma_dump()