Lines Matching refs:desc
130 struct tegra_adma_desc *desc; member
345 kfree(tdc->desc); in tegra_adma_stop()
346 tdc->desc = NULL; in tegra_adma_stop()
353 struct tegra_adma_desc *desc; in tegra_adma_start() local
360 desc = to_tegra_adma_desc(&vd->tx); in tegra_adma_start()
362 if (!desc) { in tegra_adma_start()
367 ch_regs = &desc->ch_regs; in tegra_adma_start()
381 tdc->desc = desc; in tegra_adma_start()
386 struct tegra_adma_desc *desc = tdc->desc; in tegra_adma_get_residue() local
399 periods_remaining = tdc->tx_buf_count % desc->num_periods; in tegra_adma_get_residue()
402 return desc->buf_len - (periods_remaining * desc->period_len); in tegra_adma_get_residue()
413 if (status == 0 || !tdc->desc) { in tegra_adma_isr()
418 vchan_cyclic_callback(&tdc->desc->vd); in tegra_adma_isr()
433 if (!tdc->desc) in tegra_adma_issue_pending()
453 struct tegra_adma_desc *desc = tdc->desc; in tegra_adma_pause() local
454 struct tegra_adma_chan_regs *ch_regs = &desc->ch_regs; in tegra_adma_pause()
475 struct tegra_adma_desc *desc = tdc->desc; in tegra_adma_resume() local
476 struct tegra_adma_chan_regs *ch_regs = &desc->ch_regs; in tegra_adma_resume()
493 if (tdc->desc) in tegra_adma_terminate_all()
509 struct tegra_adma_desc *desc; in tegra_adma_tx_status() local
523 desc = to_tegra_adma_desc(&vd->tx); in tegra_adma_tx_status()
524 residual = desc->ch_regs.tc; in tegra_adma_tx_status()
525 } else if (tdc->desc && tdc->desc->vd.tx.cookie == cookie) { in tegra_adma_tx_status()
555 struct tegra_adma_desc *desc, in tegra_adma_set_xfer_params() argument
559 struct tegra_adma_chan_regs *ch_regs = &desc->ch_regs; in tegra_adma_set_xfer_params()
563 if (desc->num_periods > ADMA_CH_CONFIG_MAX_BUFS) in tegra_adma_set_xfer_params()
571 ch_regs->config = ADMA_CH_CONFIG_SRC_BUF(desc->num_periods - 1); in tegra_adma_set_xfer_params()
582 ch_regs->config = ADMA_CH_CONFIG_TRG_BUF(desc->num_periods - 1); in tegra_adma_set_xfer_params()
622 ch_regs->tc = desc->period_len & ADMA_CH_TC_COUNT_MASK; in tegra_adma_set_xfer_params()
633 struct tegra_adma_desc *desc = NULL; in tegra_adma_prep_dma_cyclic() local
650 desc = kzalloc(sizeof(*desc), GFP_NOWAIT); in tegra_adma_prep_dma_cyclic()
651 if (!desc) in tegra_adma_prep_dma_cyclic()
654 desc->buf_len = buf_len; in tegra_adma_prep_dma_cyclic()
655 desc->period_len = period_len; in tegra_adma_prep_dma_cyclic()
656 desc->num_periods = buf_len / period_len; in tegra_adma_prep_dma_cyclic()
658 if (tegra_adma_set_xfer_params(tdc, desc, buf_addr, direction)) { in tegra_adma_prep_dma_cyclic()
659 kfree(desc); in tegra_adma_prep_dma_cyclic()
663 return vchan_tx_prep(&tdc->vc, &desc->vd, flags); in tegra_adma_prep_dma_cyclic()