Lines Matching refs:pchan
204 struct sun6i_pchan *pchan) in sun6i_dma_dump_chan_regs() argument
206 phys_addr_t reg = virt_to_phys(pchan->base); in sun6i_dma_dump_chan_regs()
217 pchan->idx, ®, in sun6i_dma_dump_chan_regs()
219 readl(pchan->base + DMA_CHAN_ENABLE), in sun6i_dma_dump_chan_regs()
221 readl(pchan->base + DMA_CHAN_PAUSE), in sun6i_dma_dump_chan_regs()
223 readl(pchan->base + DMA_CHAN_LLI_ADDR), in sun6i_dma_dump_chan_regs()
225 readl(pchan->base + DMA_CHAN_CUR_CFG), in sun6i_dma_dump_chan_regs()
227 readl(pchan->base + DMA_CHAN_CUR_SRC), in sun6i_dma_dump_chan_regs()
229 readl(pchan->base + DMA_CHAN_CUR_DST), in sun6i_dma_dump_chan_regs()
231 readl(pchan->base + DMA_CHAN_CUR_CNT), in sun6i_dma_dump_chan_regs()
233 readl(pchan->base + DMA_CHAN_CUR_PARA)); in sun6i_dma_dump_chan_regs()
362 struct sun6i_pchan *pchan = vchan->phy; in sun6i_dma_start_desc() local
365 if (!pchan) in sun6i_dma_start_desc()
369 pchan->desc = NULL; in sun6i_dma_start_desc()
370 pchan->done = NULL; in sun6i_dma_start_desc()
376 pchan->desc = to_sun6i_desc(&desc->tx); in sun6i_dma_start_desc()
377 pchan->done = NULL; in sun6i_dma_start_desc()
379 sun6i_dma_dump_lli(vchan, pchan->desc->v_lli); in sun6i_dma_start_desc()
381 irq_reg = pchan->idx / DMA_IRQ_CHAN_NR; in sun6i_dma_start_desc()
382 irq_offset = pchan->idx % DMA_IRQ_CHAN_NR; in sun6i_dma_start_desc()
388 writel(pchan->desc->p_lli, pchan->base + DMA_CHAN_LLI_ADDR); in sun6i_dma_start_desc()
389 writel(DMA_CHAN_ENABLE_START, pchan->base + DMA_CHAN_ENABLE); in sun6i_dma_start_desc()
392 sun6i_dma_dump_chan_regs(sdev, pchan); in sun6i_dma_start_desc()
402 struct sun6i_pchan *pchan; in sun6i_dma_tasklet() local
409 pchan = vchan->phy; in sun6i_dma_tasklet()
411 if (pchan && pchan->done) { in sun6i_dma_tasklet()
417 pchan->idx); in sun6i_dma_tasklet()
421 pchan->vchan = NULL; in sun6i_dma_tasklet()
429 pchan = &sdev->pchans[pchan_idx]; in sun6i_dma_tasklet()
431 if (pchan->vchan || list_empty(&sdev->pending)) in sun6i_dma_tasklet()
442 pchan->vchan = vchan; in sun6i_dma_tasklet()
443 vchan->phy = pchan; in sun6i_dma_tasklet()
445 pchan->idx, &vchan->vc); in sun6i_dma_tasklet()
453 pchan = sdev->pchans + pchan_idx; in sun6i_dma_tasklet()
454 vchan = pchan->vchan; in sun6i_dma_tasklet()
467 struct sun6i_pchan *pchan; in sun6i_dma_interrupt() local
483 pchan = sdev->pchans + j; in sun6i_dma_interrupt()
484 vchan = pchan->vchan; in sun6i_dma_interrupt()
488 vchan_cookie_complete(&pchan->desc->vd); in sun6i_dma_interrupt()
489 pchan->done = pchan->desc; in sun6i_dma_interrupt()
660 struct sun6i_pchan *pchan = vchan->phy; in sun6i_dma_pause() local
664 if (pchan) { in sun6i_dma_pause()
666 pchan->base + DMA_CHAN_PAUSE); in sun6i_dma_pause()
680 struct sun6i_pchan *pchan = vchan->phy; in sun6i_dma_resume() local
687 if (pchan) { in sun6i_dma_resume()
689 pchan->base + DMA_CHAN_PAUSE); in sun6i_dma_resume()
705 struct sun6i_pchan *pchan = vchan->phy; in sun6i_dma_terminate_all() local
717 if (pchan) { in sun6i_dma_terminate_all()
718 writel(DMA_CHAN_ENABLE_STOP, pchan->base + DMA_CHAN_ENABLE); in sun6i_dma_terminate_all()
719 writel(DMA_CHAN_PAUSE_RESUME, pchan->base + DMA_CHAN_PAUSE); in sun6i_dma_terminate_all()
722 pchan->vchan = NULL; in sun6i_dma_terminate_all()
723 pchan->desc = NULL; in sun6i_dma_terminate_all()
724 pchan->done = NULL; in sun6i_dma_terminate_all()
739 struct sun6i_pchan *pchan = vchan->phy; in sun6i_dma_tx_status() local
759 } else if (!pchan || !pchan->desc) { in sun6i_dma_tx_status()
762 bytes = readl(pchan->base + DMA_CHAN_CUR_CNT); in sun6i_dma_tx_status()
1002 struct sun6i_pchan *pchan = &sdc->pchans[i]; in sun6i_dma_probe() local
1004 pchan->idx = i; in sun6i_dma_probe()
1005 pchan->base = sdc->base + 0x100 + i * 0x40; in sun6i_dma_probe()