Lines Matching refs:MTK_DMA_SIZE
40 #define MTK_DMA_SIZE 64 macro
326 pc->sz_ring = 2 * MTK_DMA_SIZE * sizeof(*ring->txd); in mtk_hsdma_alloc_pchan()
332 ring->rxd = &ring->txd[MTK_DMA_SIZE]; in mtk_hsdma_alloc_pchan()
333 ring->rphys = ring->tphys + MTK_DMA_SIZE * sizeof(*ring->txd); in mtk_hsdma_alloc_pchan()
335 ring->cur_rptr = MTK_DMA_SIZE - 1; in mtk_hsdma_alloc_pchan()
337 ring->cb = kcalloc(MTK_DMA_SIZE, sizeof(*ring->cb), GFP_NOWAIT); in mtk_hsdma_alloc_pchan()
343 atomic_set(&pc->nr_free, MTK_DMA_SIZE - 1); in mtk_hsdma_alloc_pchan()
359 mtk_dma_write(hsdma, MTK_HSDMA_TX_CNT, MTK_DMA_SIZE); in mtk_hsdma_alloc_pchan()
363 mtk_dma_write(hsdma, MTK_HSDMA_RX_CNT, MTK_DMA_SIZE); in mtk_hsdma_alloc_pchan()
403 mtk_dma_write(hsdma, MTK_HSDMA_RX_CPU, MTK_DMA_SIZE - 1); in mtk_hsdma_free_pchan()
463 MTK_DMA_SIZE); in mtk_hsdma_issue_pending_vdesc()
476 prev = MTK_HSDMA_LAST_DESP_IDX(ring->cur_tptr, MTK_DMA_SIZE); in mtk_hsdma_issue_pending_vdesc()
539 int i = MTK_DMA_SIZE; in mtk_hsdma_free_rooms_in_ring()
560 MTK_DMA_SIZE); in mtk_hsdma_free_rooms_in_ring()
628 if (atomic_read(&pc->nr_free) >= MTK_DMA_SIZE - 1) in mtk_hsdma_free_rooms_in_ring()