Lines Matching full:tchan

288 	struct udma_tchan *tchan;  member
359 if (!uc->tchan) in udma_tchanrt_read()
361 return udma_read(uc->tchan->reg_rt, reg); in udma_tchanrt_read()
366 if (!uc->tchan) in udma_tchanrt_write()
368 udma_write(uc->tchan->reg_rt, reg, val); in udma_tchanrt_write()
374 if (!uc->tchan) in udma_tchanrt_update_bits()
376 udma_update_bits(uc->tchan->reg_rt, reg, mask, val); in udma_tchanrt_update_bits()
475 dev_dbg(dev, "TCHAN State data:\n"); in udma_dump_chan_stdata()
608 if (uc->tchan) in udma_is_chan_running()
663 ring = uc->tchan->t_ring; in udma_push_to_ring()
703 ring = uc->tchan->tc_ring; in udma_pop_from_ring()
740 if (uc->tchan) { in udma_reset_rings()
741 ring1 = uc->tchan->t_ring; in udma_reset_rings()
742 ring2 = uc->tchan->tc_ring; in udma_reset_rings()
781 if (uc->tchan) { in udma_reset_counters()
1371 UDMA_RESERVE_RESOURCE(tchan);
1402 uc->tchan = uc->bchan; in bcdma_get_bchan()
1412 if (uc->tchan) { in udma_get_tchan()
1413 dev_dbg(ud->dev, "chan%d: already have tchan%d allocated\n", in udma_get_tchan()
1414 uc->id, uc->tchan->id); in udma_get_tchan()
1423 uc->tchan = __udma_reserve_tchan(ud, uc->config.channel_tpl, in udma_get_tchan()
1425 if (IS_ERR(uc->tchan)) { in udma_get_tchan()
1426 ret = PTR_ERR(uc->tchan); in udma_get_tchan()
1427 uc->tchan = NULL; in udma_get_tchan()
1438 tflow_id = uc->tchan->id; in udma_get_tchan()
1442 clear_bit(uc->tchan->id, ud->tchan_map); in udma_get_tchan()
1443 uc->tchan = NULL; in udma_get_tchan()
1447 uc->tchan->tflow_id = tflow_id; in udma_get_tchan()
1450 uc->tchan->tflow_id = -1; in udma_get_tchan()
1488 if ((uc->tchan && uc->rchan) && uc->tchan->id == uc->rchan->id) { in udma_get_chan_pair()
1490 uc->id, uc->tchan->id); in udma_get_chan_pair()
1494 if (uc->tchan) { in udma_get_chan_pair()
1495 dev_err(ud->dev, "chan%d: already have tchan%d allocated\n", in udma_get_chan_pair()
1496 uc->id, uc->tchan->id); in udma_get_chan_pair()
1508 * Note: in UDMAP the channel TPL is symmetric between tchan and rchan in udma_get_chan_pair()
1522 uc->tchan = &ud->tchans[chan_id]; in udma_get_chan_pair()
1526 uc->tchan->tflow_id = -1; in udma_get_chan_pair()
1566 uc->tchan = NULL; in bcdma_put_bchan()
1586 if (uc->tchan) { in udma_put_tchan()
1587 dev_dbg(ud->dev, "chan%d: put tchan%d\n", uc->id, in udma_put_tchan()
1588 uc->tchan->id); in udma_put_tchan()
1589 clear_bit(uc->tchan->id, ud->tchan_map); in udma_put_tchan()
1591 if (uc->tchan->tflow_id >= 0) in udma_put_tchan()
1592 clear_bit(uc->tchan->tflow_id, ud->tflow_map); in udma_put_tchan()
1594 uc->tchan = NULL; in udma_put_tchan()
1671 if (!uc->tchan) in udma_free_tx_resources()
1674 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_free_tx_resources()
1675 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_free_tx_resources()
1676 uc->tchan->t_ring = NULL; in udma_free_tx_resources()
1677 uc->tchan->tc_ring = NULL; in udma_free_tx_resources()
1686 struct udma_tchan *tchan; in udma_alloc_tx_resources() local
1693 tchan = uc->tchan; in udma_alloc_tx_resources()
1694 if (tchan->tflow_id >= 0) in udma_alloc_tx_resources()
1695 ring_idx = tchan->tflow_id; in udma_alloc_tx_resources()
1697 ring_idx = ud->bchan_cnt + tchan->id; in udma_alloc_tx_resources()
1700 &tchan->t_ring, in udma_alloc_tx_resources()
1701 &tchan->tc_ring); in udma_alloc_tx_resources()
1720 ret = k3_ringacc_ring_cfg(tchan->t_ring, &ring_cfg); in udma_alloc_tx_resources()
1721 ret |= k3_ringacc_ring_cfg(tchan->tc_ring, &ring_cfg); in udma_alloc_tx_resources()
1729 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_alloc_tx_resources()
1730 uc->tchan->tc_ring = NULL; in udma_alloc_tx_resources()
1731 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_alloc_tx_resources()
1732 uc->tchan->t_ring = NULL; in udma_alloc_tx_resources()
1877 struct udma_tchan *tchan = uc->tchan; in udma_tisci_m2m_channel_config() local
1884 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_m2m_channel_config()
1889 tpl = udma_get_chan_tpl_index(&ud->tchan_tpl, tchan->id); in udma_tisci_m2m_channel_config()
1896 req_tx.index = tchan->id; in udma_tisci_m2m_channel_config()
1908 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_m2m_channel_config()
1969 struct udma_tchan *tchan = uc->tchan; in udma_tisci_tx_channel_config() local
1970 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_tx_channel_config()
1986 req_tx.index = tchan->id; in udma_tisci_tx_channel_config()
2002 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_tx_channel_config()
2012 struct udma_tchan *tchan = uc->tchan; in bcdma_tisci_tx_channel_config() local
2018 req_tx.index = tchan->id; in bcdma_tisci_tx_channel_config()
2029 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in bcdma_tisci_tx_channel_config()
2248 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2252 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2253 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2266 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2270 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2271 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2433 uc->config.src_thread = ud->psil_base + uc->tchan->id; in bcdma_alloc_chan_resources()
2437 irq_ring_idx = uc->tchan->id + oes->bcdma_tchan_ring; in bcdma_alloc_chan_resources()
2438 irq_udma_idx = uc->tchan->id + oes->bcdma_tchan_data; in bcdma_alloc_chan_resources()
2628 uc->config.src_thread = ud->psil_base + uc->tchan->id; in pktdma_alloc_chan_resources()
2632 irq_ring_idx = uc->tchan->tflow_id + oes->pktdma_tchan_flow; in pktdma_alloc_chan_resources()
2722 if (uc->tchan) in pktdma_alloc_chan_resources()
2724 "chan%d: tchan%d, tflow%d, Remote thread: 0x%04x\n", in pktdma_alloc_chan_resources()
2725 uc->id, uc->tchan->id, uc->tchan->tflow_id, in pktdma_alloc_chan_resources()
2827 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_alloc_tr_desc()
3254 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_slave_sg_pkt()
3601 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_dma_cyclic_pkt()
4377 .psil_base = 0x2000, /* for tchan and rchan, not applicable to bchan */
4577 [RM_RANGE_TCHAN] = "ti,sci-rm-range-tchan",
4663 /* tchan ranges */ in udma_setup_resources()
4672 &rm_res->desc[i], "tchan"); in udma_setup_resources()
4849 /* tchan ranges */ in bcdma_setup_resources()
4860 "tchan"); in bcdma_setup_resources()
5033 /* tchan ranges */ in pktdma_setup_resources()
5041 &rm_res->desc[i], "tchan"); in pktdma_setup_resources()
5169 "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n", in setup_resources()
5180 "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n", in setup_resources()
5191 "Channels: %d (tchan: %u, rchan: %u)\n", in setup_resources()
5322 seq_printf(s, "chan%d pair [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5332 seq_printf(s, "tchan%d [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5335 seq_printf(s, "tflow%d, ", uc->tchan->tflow_id); in udma_dbg_summary_show_chan()
5593 struct udma_tchan *tchan = &ud->tchans[i]; in udma_probe() local
5595 tchan->id = i; in udma_probe()
5596 tchan->reg_rt = ud->mmrs[MMR_TCHANRT] + i * 0x1000; in udma_probe()
5619 uc->tchan = NULL; in udma_probe()