Lines Matching refs:dp
212 void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp) in au1xxx_ddma_get_nextptr_virt() argument
214 return phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_ddma_get_nextptr_virt()
398 au1x_ddma_desc_t *dp; in au1xxx_dbdma_ring_alloc() local
436 dp = (au1x_ddma_desc_t *)desc_base; in au1xxx_dbdma_ring_alloc()
439 ctp->chan_desc_base = dp; in au1xxx_dbdma_ring_alloc()
564 dp->dscr_cmd0 = cmd0; in au1xxx_dbdma_ring_alloc()
565 dp->dscr_cmd1 = cmd1; in au1xxx_dbdma_ring_alloc()
566 dp->dscr_source0 = src0; in au1xxx_dbdma_ring_alloc()
567 dp->dscr_source1 = src1; in au1xxx_dbdma_ring_alloc()
568 dp->dscr_dest0 = dest0; in au1xxx_dbdma_ring_alloc()
569 dp->dscr_dest1 = dest1; in au1xxx_dbdma_ring_alloc()
570 dp->dscr_stat = 0; in au1xxx_dbdma_ring_alloc()
571 dp->sw_context = 0; in au1xxx_dbdma_ring_alloc()
572 dp->sw_status = 0; in au1xxx_dbdma_ring_alloc()
573 dp->dscr_nxtptr = DSCR_NXTPTR(virt_to_phys(dp + 1)); in au1xxx_dbdma_ring_alloc()
574 dp++; in au1xxx_dbdma_ring_alloc()
578 dp--; in au1xxx_dbdma_ring_alloc()
579 dp->dscr_nxtptr = DSCR_NXTPTR(virt_to_phys(ctp->chan_desc_base)); in au1xxx_dbdma_ring_alloc()
594 au1x_ddma_desc_t *dp; in au1xxx_dbdma_put_source() local
607 dp = ctp->put_ptr; in au1xxx_dbdma_put_source()
613 if (dp->dscr_cmd0 & DSCR_CMD0_V) in au1xxx_dbdma_put_source()
617 dp->dscr_source0 = buf & ~0UL; in au1xxx_dbdma_put_source()
618 dp->dscr_cmd1 = nbytes; in au1xxx_dbdma_put_source()
621 dp->dscr_cmd0 |= DSCR_CMD0_IE; in au1xxx_dbdma_put_source()
623 dp->dscr_cmd0 &= ~DSCR_CMD0_IE; in au1xxx_dbdma_put_source()
633 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ in au1xxx_dbdma_put_source()
635 dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); in au1xxx_dbdma_put_source()
639 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_put_source()
653 au1x_ddma_desc_t *dp; in au1xxx_dbdma_put_dest() local
664 dp = ctp->put_ptr; in au1xxx_dbdma_put_dest()
669 if (dp->dscr_cmd0 & DSCR_CMD0_V) in au1xxx_dbdma_put_dest()
676 dp->dscr_cmd0 |= DSCR_CMD0_IE; in au1xxx_dbdma_put_dest()
678 dp->dscr_cmd0 &= ~DSCR_CMD0_IE; in au1xxx_dbdma_put_dest()
680 dp->dscr_dest0 = buf & ~0UL; in au1xxx_dbdma_put_dest()
681 dp->dscr_cmd1 = nbytes; in au1xxx_dbdma_put_dest()
684 dp->dscr_cmd0, dp->dscr_cmd1, dp->dscr_source0, in au1xxx_dbdma_put_dest()
685 dp->dscr_source1, dp->dscr_dest0, dp->dscr_dest1); in au1xxx_dbdma_put_dest()
695 dp->dscr_cmd0 |= DSCR_CMD0_V; /* Let it rip */ in au1xxx_dbdma_put_dest()
697 dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); in au1xxx_dbdma_put_dest()
701 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_put_dest()
717 au1x_ddma_desc_t *dp; in au1xxx_dbdma_get_dest() local
731 dp = ctp->get_ptr; in au1xxx_dbdma_get_dest()
737 if (dp->dscr_cmd0 & DSCR_CMD0_V) in au1xxx_dbdma_get_dest()
741 *buf = (void *)(phys_to_virt(dp->dscr_dest0)); in au1xxx_dbdma_get_dest()
742 *nbytes = dp->dscr_cmd1; in au1xxx_dbdma_get_dest()
743 rv = dp->dscr_stat; in au1xxx_dbdma_get_dest()
746 ctp->get_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_get_dest()
801 au1x_ddma_desc_t *dp; in au1xxx_dbdma_reset() local
809 dp = ctp->chan_desc_base; in au1xxx_dbdma_reset()
812 dp->dscr_cmd0 &= ~DSCR_CMD0_V; in au1xxx_dbdma_reset()
818 dp->sw_status = 0; in au1xxx_dbdma_reset()
819 dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_reset()
820 } while (dp != ctp->chan_desc_base); in au1xxx_dbdma_reset()
867 au1x_ddma_desc_t *dp; in dbdma_interrupt() local
876 dp = ctp->cur_ptr; in dbdma_interrupt()
885 ctp->cur_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in dbdma_interrupt()
892 au1x_ddma_desc_t *dp; in au1xxx_dbdma_dump() local
917 dp = ctp->chan_desc_base; in au1xxx_dbdma_dump()
921 i++, (u32)dp, dp->dscr_cmd0, dp->dscr_cmd1); in au1xxx_dbdma_dump()
923 dp->dscr_source0, dp->dscr_source1, in au1xxx_dbdma_dump()
924 dp->dscr_dest0, dp->dscr_dest1); in au1xxx_dbdma_dump()
926 dp->dscr_stat, dp->dscr_nxtptr); in au1xxx_dbdma_dump()
927 dp = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_dump()
928 } while (dp != ctp->chan_desc_base); in au1xxx_dbdma_dump()
937 au1x_ddma_desc_t *dp; in au1xxx_dbdma_put_dscr() local
951 dp = ctp->put_ptr; in au1xxx_dbdma_put_dscr()
957 if (dp->dscr_cmd0 & DSCR_CMD0_V) in au1xxx_dbdma_put_dscr()
961 dp->dscr_dest0 = dscr->dscr_dest0; in au1xxx_dbdma_put_dscr()
962 dp->dscr_source0 = dscr->dscr_source0; in au1xxx_dbdma_put_dscr()
963 dp->dscr_dest1 = dscr->dscr_dest1; in au1xxx_dbdma_put_dscr()
964 dp->dscr_source1 = dscr->dscr_source1; in au1xxx_dbdma_put_dscr()
965 dp->dscr_cmd1 = dscr->dscr_cmd1; in au1xxx_dbdma_put_dscr()
968 dp->dscr_cmd0 &= ~DSCR_CMD0_IE; in au1xxx_dbdma_put_dscr()
969 dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V; in au1xxx_dbdma_put_dscr()
973 ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); in au1xxx_dbdma_put_dscr()