Lines Matching refs:txd
399 struct pl08x_txd *txd = to_pl08x_txd(&vd->tx); in pl08x_start_next_txd() local
402 list_del(&txd->vd.node); in pl08x_start_next_txd()
404 plchan->at = txd; in pl08x_start_next_txd()
410 pl08x_write_lli(pl08x, phychan, &txd->llis_va[0], txd->ccfg); in pl08x_start_next_txd()
532 struct pl08x_txd *txd; in pl08x_getbytes_chan() local
538 txd = plchan->at; in pl08x_getbytes_chan()
540 if (!ch || !txd) in pl08x_getbytes_chan()
560 llis_va = txd->llis_va; in pl08x_getbytes_chan()
561 llis_bus = txd->llis_bus; in pl08x_getbytes_chan()
804 struct pl08x_txd *txd; member
848 u32 *llis_va = bd->txd->llis_va + offset; in pl08x_fill_lli_for_desc()
849 dma_addr_t llis_bus = bd->txd->llis_bus; in pl08x_fill_lli_for_desc()
927 struct pl08x_txd *txd) in pl08x_fill_llis_for_desc() argument
937 txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, &txd->llis_bus); in pl08x_fill_llis_for_desc()
938 if (!txd->llis_va) { in pl08x_fill_llis_for_desc()
943 bd.txd = txd; in pl08x_fill_llis_for_desc()
945 cctl = txd->cctl; in pl08x_fill_llis_for_desc()
957 list_for_each_entry(dsg, &txd->dsg_list, node) { in pl08x_fill_llis_for_desc()
959 cctl = txd->cctl; in pl08x_fill_llis_for_desc()
1004 u32 fc = (txd->ccfg & PL080_CONFIG_FLOW_CONTROL_MASK) >> in pl08x_fill_llis_for_desc()
1136 llis_va = txd->llis_va; in pl08x_fill_llis_for_desc()
1139 if (txd->cyclic) { in pl08x_fill_llis_for_desc()
1141 last_lli[PL080_LLI_LLI] = txd->llis_bus | bd.lli_bus; in pl08x_fill_llis_for_desc()
1155 struct pl08x_txd *txd) in pl08x_free_txd() argument
1159 if (txd->llis_va) in pl08x_free_txd()
1160 dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus); in pl08x_free_txd()
1162 list_for_each_entry_safe(dsg, _dsg, &txd->dsg_list, node) { in pl08x_free_txd()
1167 kfree(txd); in pl08x_free_txd()
1172 struct pl08x_txd *txd = to_pl08x_txd(&vd->tx); in pl08x_desc_free() local
1176 if (!txd->done) in pl08x_desc_free()
1179 pl08x_free_txd(plchan->host, txd); in pl08x_desc_free()
1242 struct pl08x_txd *txd = to_pl08x_txd(&vd->tx); in pl08x_dma_tx_status() local
1245 list_for_each_entry(dsg, &txd->dsg_list, node) in pl08x_dma_tx_status()
1405 struct pl08x_txd *txd = kzalloc(sizeof(*txd), GFP_NOWAIT); in pl08x_get_txd() local
1407 if (txd) { in pl08x_get_txd()
1408 INIT_LIST_HEAD(&txd->dsg_list); in pl08x_get_txd()
1411 txd->ccfg = PL080_CONFIG_ERR_IRQ_MASK | in pl08x_get_txd()
1414 return txd; in pl08x_get_txd()
1426 struct pl08x_txd *txd; in pl08x_prep_dma_memcpy() local
1430 txd = pl08x_get_txd(plchan); in pl08x_prep_dma_memcpy()
1431 if (!txd) { in pl08x_prep_dma_memcpy()
1439 pl08x_free_txd(pl08x, txd); in pl08x_prep_dma_memcpy()
1444 list_add_tail(&dsg->node, &txd->dsg_list); in pl08x_prep_dma_memcpy()
1451 txd->ccfg |= PL080_FLOW_MEM2MEM << PL080_CONFIG_FLOW_CONTROL_SHIFT; in pl08x_prep_dma_memcpy()
1452 txd->cctl = pl08x->pd->memcpy_channel.cctl_memcpy & in pl08x_prep_dma_memcpy()
1456 txd->cctl |= PL080_CONTROL_SRC_INCR | PL080_CONTROL_DST_INCR; in pl08x_prep_dma_memcpy()
1459 txd->cctl |= pl08x_select_bus(pl08x->mem_buses, in pl08x_prep_dma_memcpy()
1462 ret = pl08x_fill_llis_for_desc(plchan->host, txd); in pl08x_prep_dma_memcpy()
1464 pl08x_free_txd(pl08x, txd); in pl08x_prep_dma_memcpy()
1468 return vchan_tx_prep(&plchan->vc, &txd->vd, flags); in pl08x_prep_dma_memcpy()
1478 struct pl08x_txd *txd; in pl08x_init_txd() local
1484 txd = pl08x_get_txd(plchan); in pl08x_init_txd()
1485 if (!txd) { in pl08x_init_txd()
1510 pl08x_free_txd(pl08x, txd); in pl08x_init_txd()
1518 pl08x_free_txd(pl08x, txd); in pl08x_init_txd()
1524 txd->cctl = cctl | pl08x_select_bus(src_buses, dst_buses); in pl08x_init_txd()
1533 txd->ccfg |= tmp << PL080_CONFIG_FLOW_CONTROL_SHIFT; in pl08x_init_txd()
1537 pl08x_free_txd(pl08x, txd); in pl08x_init_txd()
1549 txd->ccfg |= plchan->signal << PL080_CONFIG_DST_SEL_SHIFT; in pl08x_init_txd()
1551 txd->ccfg |= plchan->signal << PL080_CONFIG_SRC_SEL_SHIFT; in pl08x_init_txd()
1553 return txd; in pl08x_init_txd()
1556 static int pl08x_tx_add_sg(struct pl08x_txd *txd, in pl08x_tx_add_sg() argument
1568 list_add_tail(&dsg->node, &txd->dsg_list); in pl08x_tx_add_sg()
1589 struct pl08x_txd *txd; in pl08x_prep_slave_sg() local
1597 txd = pl08x_init_txd(chan, direction, &slave_addr); in pl08x_prep_slave_sg()
1598 if (!txd) in pl08x_prep_slave_sg()
1602 ret = pl08x_tx_add_sg(txd, direction, slave_addr, in pl08x_prep_slave_sg()
1607 pl08x_free_txd(pl08x, txd); in pl08x_prep_slave_sg()
1614 ret = pl08x_fill_llis_for_desc(plchan->host, txd); in pl08x_prep_slave_sg()
1617 pl08x_free_txd(pl08x, txd); in pl08x_prep_slave_sg()
1621 return vchan_tx_prep(&plchan->vc, &txd->vd, flags); in pl08x_prep_slave_sg()
1631 struct pl08x_txd *txd; in pl08x_prep_dma_cyclic() local
1641 txd = pl08x_init_txd(chan, direction, &slave_addr); in pl08x_prep_dma_cyclic()
1642 if (!txd) in pl08x_prep_dma_cyclic()
1645 txd->cyclic = true; in pl08x_prep_dma_cyclic()
1646 txd->cctl |= PL080_CONTROL_TC_IRQ_EN; in pl08x_prep_dma_cyclic()
1648 ret = pl08x_tx_add_sg(txd, direction, slave_addr, in pl08x_prep_dma_cyclic()
1652 pl08x_free_txd(pl08x, txd); in pl08x_prep_dma_cyclic()
1657 ret = pl08x_fill_llis_for_desc(plchan->host, txd); in pl08x_prep_dma_cyclic()
1660 pl08x_free_txd(pl08x, txd); in pl08x_prep_dma_cyclic()
1664 return vchan_tx_prep(&plchan->vc, &txd->vd, flags); in pl08x_prep_dma_cyclic()