Lines Matching refs:tchan
286 struct udma_tchan *tchan; member
357 if (!uc->tchan) in udma_tchanrt_read()
359 return udma_read(uc->tchan->reg_rt, reg); in udma_tchanrt_read()
364 if (!uc->tchan) in udma_tchanrt_write()
366 udma_write(uc->tchan->reg_rt, reg, val); in udma_tchanrt_write()
372 if (!uc->tchan) in udma_tchanrt_update_bits()
374 udma_update_bits(uc->tchan->reg_rt, reg, mask, val); in udma_tchanrt_update_bits()
606 if (uc->tchan) in udma_is_chan_running()
661 ring = uc->tchan->t_ring; in udma_push_to_ring()
701 ring = uc->tchan->tc_ring; in udma_pop_from_ring()
738 if (uc->tchan) { in udma_reset_rings()
739 ring1 = uc->tchan->t_ring; in udma_reset_rings()
740 ring2 = uc->tchan->tc_ring; in udma_reset_rings()
764 if (uc->tchan) { in udma_reset_counters()
1344 UDMA_RESERVE_RESOURCE(tchan);
1375 uc->tchan = uc->bchan; in bcdma_get_bchan()
1385 if (uc->tchan) { in udma_get_tchan()
1387 uc->id, uc->tchan->id); in udma_get_tchan()
1396 uc->tchan = __udma_reserve_tchan(ud, uc->config.channel_tpl, in udma_get_tchan()
1398 if (IS_ERR(uc->tchan)) { in udma_get_tchan()
1399 ret = PTR_ERR(uc->tchan); in udma_get_tchan()
1400 uc->tchan = NULL; in udma_get_tchan()
1411 tflow_id = uc->tchan->id; in udma_get_tchan()
1415 clear_bit(uc->tchan->id, ud->tchan_map); in udma_get_tchan()
1416 uc->tchan = NULL; in udma_get_tchan()
1420 uc->tchan->tflow_id = tflow_id; in udma_get_tchan()
1423 uc->tchan->tflow_id = -1; in udma_get_tchan()
1461 if ((uc->tchan && uc->rchan) && uc->tchan->id == uc->rchan->id) { in udma_get_chan_pair()
1463 uc->id, uc->tchan->id); in udma_get_chan_pair()
1467 if (uc->tchan) { in udma_get_chan_pair()
1469 uc->id, uc->tchan->id); in udma_get_chan_pair()
1495 uc->tchan = &ud->tchans[chan_id]; in udma_get_chan_pair()
1499 uc->tchan->tflow_id = -1; in udma_get_chan_pair()
1539 uc->tchan = NULL; in bcdma_put_bchan()
1559 if (uc->tchan) { in udma_put_tchan()
1561 uc->tchan->id); in udma_put_tchan()
1562 clear_bit(uc->tchan->id, ud->tchan_map); in udma_put_tchan()
1564 if (uc->tchan->tflow_id >= 0) in udma_put_tchan()
1565 clear_bit(uc->tchan->tflow_id, ud->tflow_map); in udma_put_tchan()
1567 uc->tchan = NULL; in udma_put_tchan()
1644 if (!uc->tchan) in udma_free_tx_resources()
1647 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_free_tx_resources()
1648 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_free_tx_resources()
1649 uc->tchan->t_ring = NULL; in udma_free_tx_resources()
1650 uc->tchan->tc_ring = NULL; in udma_free_tx_resources()
1659 struct udma_tchan *tchan; in udma_alloc_tx_resources() local
1666 tchan = uc->tchan; in udma_alloc_tx_resources()
1667 if (tchan->tflow_id >= 0) in udma_alloc_tx_resources()
1668 ring_idx = tchan->tflow_id; in udma_alloc_tx_resources()
1670 ring_idx = ud->bchan_cnt + tchan->id; in udma_alloc_tx_resources()
1673 &tchan->t_ring, in udma_alloc_tx_resources()
1674 &tchan->tc_ring); in udma_alloc_tx_resources()
1693 ret = k3_ringacc_ring_cfg(tchan->t_ring, &ring_cfg); in udma_alloc_tx_resources()
1694 ret |= k3_ringacc_ring_cfg(tchan->tc_ring, &ring_cfg); in udma_alloc_tx_resources()
1702 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_alloc_tx_resources()
1703 uc->tchan->tc_ring = NULL; in udma_alloc_tx_resources()
1704 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_alloc_tx_resources()
1705 uc->tchan->t_ring = NULL; in udma_alloc_tx_resources()
1850 struct udma_tchan *tchan = uc->tchan; in udma_tisci_m2m_channel_config() local
1857 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_m2m_channel_config()
1862 tpl = udma_get_chan_tpl_index(&ud->tchan_tpl, tchan->id); in udma_tisci_m2m_channel_config()
1869 req_tx.index = tchan->id; in udma_tisci_m2m_channel_config()
1881 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_m2m_channel_config()
1942 struct udma_tchan *tchan = uc->tchan; in udma_tisci_tx_channel_config() local
1943 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_tx_channel_config()
1959 req_tx.index = tchan->id; in udma_tisci_tx_channel_config()
1975 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_tx_channel_config()
1985 struct udma_tchan *tchan = uc->tchan; in bcdma_tisci_tx_channel_config() local
1991 req_tx.index = tchan->id; in bcdma_tisci_tx_channel_config()
2002 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in bcdma_tisci_tx_channel_config()
2221 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2225 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2226 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2239 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2243 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2244 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2406 uc->config.src_thread = ud->psil_base + uc->tchan->id; in bcdma_alloc_chan_resources()
2410 irq_ring_idx = uc->tchan->id + oes->bcdma_tchan_ring; in bcdma_alloc_chan_resources()
2411 irq_udma_idx = uc->tchan->id + oes->bcdma_tchan_data; in bcdma_alloc_chan_resources()
2601 uc->config.src_thread = ud->psil_base + uc->tchan->id; in pktdma_alloc_chan_resources()
2605 irq_ring_idx = uc->tchan->tflow_id + oes->pktdma_tchan_flow; in pktdma_alloc_chan_resources()
2695 if (uc->tchan) in pktdma_alloc_chan_resources()
2698 uc->id, uc->tchan->id, uc->tchan->tflow_id, in pktdma_alloc_chan_resources()
2800 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_alloc_tr_desc()
3214 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_slave_sg_pkt()
3541 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_dma_cyclic_pkt()
5153 seq_printf(s, "chan%d pair [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5163 seq_printf(s, "tchan%d [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5166 seq_printf(s, "tflow%d, ", uc->tchan->tflow_id); in udma_dbg_summary_show_chan()
5427 struct udma_tchan *tchan = &ud->tchans[i]; in udma_probe() local
5429 tchan->id = i; in udma_probe()
5430 tchan->reg_rt = ud->mmrs[MMR_TCHANRT] + i * 0x1000; in udma_probe()
5453 uc->tchan = NULL; in udma_probe()