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()
1364 UDMA_RESERVE_RESOURCE(tchan);
1395 uc->tchan = uc->bchan; in bcdma_get_bchan()
1405 if (uc->tchan) { in udma_get_tchan()
1406 dev_dbg(ud->dev, "chan%d: already have tchan%d allocated\n", in udma_get_tchan()
1407 uc->id, uc->tchan->id); in udma_get_tchan()
1416 uc->tchan = __udma_reserve_tchan(ud, uc->config.channel_tpl, in udma_get_tchan()
1418 if (IS_ERR(uc->tchan)) { in udma_get_tchan()
1419 ret = PTR_ERR(uc->tchan); in udma_get_tchan()
1420 uc->tchan = NULL; in udma_get_tchan()
1431 tflow_id = uc->tchan->id; in udma_get_tchan()
1435 clear_bit(uc->tchan->id, ud->tchan_map); in udma_get_tchan()
1436 uc->tchan = NULL; in udma_get_tchan()
1440 uc->tchan->tflow_id = tflow_id; in udma_get_tchan()
1443 uc->tchan->tflow_id = -1; in udma_get_tchan()
1481 if ((uc->tchan && uc->rchan) && uc->tchan->id == uc->rchan->id) { in udma_get_chan_pair()
1483 uc->id, uc->tchan->id); in udma_get_chan_pair()
1487 if (uc->tchan) { in udma_get_chan_pair()
1488 dev_err(ud->dev, "chan%d: already have tchan%d allocated\n", in udma_get_chan_pair()
1489 uc->id, uc->tchan->id); in udma_get_chan_pair()
1501 * Note: in UDMAP the channel TPL is symmetric between tchan and rchan in udma_get_chan_pair()
1515 uc->tchan = &ud->tchans[chan_id]; in udma_get_chan_pair()
1519 uc->tchan->tflow_id = -1; in udma_get_chan_pair()
1559 uc->tchan = NULL; in bcdma_put_bchan()
1579 if (uc->tchan) { in udma_put_tchan()
1580 dev_dbg(ud->dev, "chan%d: put tchan%d\n", uc->id, in udma_put_tchan()
1581 uc->tchan->id); in udma_put_tchan()
1582 clear_bit(uc->tchan->id, ud->tchan_map); in udma_put_tchan()
1584 if (uc->tchan->tflow_id >= 0) in udma_put_tchan()
1585 clear_bit(uc->tchan->tflow_id, ud->tflow_map); in udma_put_tchan()
1587 uc->tchan = NULL; in udma_put_tchan()
1664 if (!uc->tchan) in udma_free_tx_resources()
1667 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_free_tx_resources()
1668 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_free_tx_resources()
1669 uc->tchan->t_ring = NULL; in udma_free_tx_resources()
1670 uc->tchan->tc_ring = NULL; in udma_free_tx_resources()
1679 struct udma_tchan *tchan; in udma_alloc_tx_resources() local
1686 tchan = uc->tchan; in udma_alloc_tx_resources()
1687 if (tchan->tflow_id >= 0) in udma_alloc_tx_resources()
1688 ring_idx = tchan->tflow_id; in udma_alloc_tx_resources()
1690 ring_idx = ud->bchan_cnt + tchan->id; in udma_alloc_tx_resources()
1693 &tchan->t_ring, in udma_alloc_tx_resources()
1694 &tchan->tc_ring); in udma_alloc_tx_resources()
1713 ret = k3_ringacc_ring_cfg(tchan->t_ring, &ring_cfg); in udma_alloc_tx_resources()
1714 ret |= k3_ringacc_ring_cfg(tchan->tc_ring, &ring_cfg); in udma_alloc_tx_resources()
1722 k3_ringacc_ring_free(uc->tchan->tc_ring); in udma_alloc_tx_resources()
1723 uc->tchan->tc_ring = NULL; in udma_alloc_tx_resources()
1724 k3_ringacc_ring_free(uc->tchan->t_ring); in udma_alloc_tx_resources()
1725 uc->tchan->t_ring = NULL; in udma_alloc_tx_resources()
1870 struct udma_tchan *tchan = uc->tchan; in udma_tisci_m2m_channel_config() local
1877 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_m2m_channel_config()
1882 tpl = udma_get_chan_tpl_index(&ud->tchan_tpl, tchan->id); in udma_tisci_m2m_channel_config()
1889 req_tx.index = tchan->id; in udma_tisci_m2m_channel_config()
1901 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_m2m_channel_config()
1962 struct udma_tchan *tchan = uc->tchan; in udma_tisci_tx_channel_config() local
1963 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring); in udma_tisci_tx_channel_config()
1979 req_tx.index = tchan->id; in udma_tisci_tx_channel_config()
1995 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in udma_tisci_tx_channel_config()
2005 struct udma_tchan *tchan = uc->tchan; in bcdma_tisci_tx_channel_config() local
2011 req_tx.index = tchan->id; in bcdma_tisci_tx_channel_config()
2022 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret); in bcdma_tisci_tx_channel_config()
2241 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2245 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2246 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2259 uc->config.src_thread = ud->psil_base + uc->tchan->id; in udma_alloc_chan_resources()
2263 irq_ring = uc->tchan->tc_ring; in udma_alloc_chan_resources()
2264 irq_udma_idx = uc->tchan->id; in udma_alloc_chan_resources()
2426 uc->config.src_thread = ud->psil_base + uc->tchan->id; in bcdma_alloc_chan_resources()
2430 irq_ring_idx = uc->tchan->id + oes->bcdma_tchan_ring; in bcdma_alloc_chan_resources()
2431 irq_udma_idx = uc->tchan->id + oes->bcdma_tchan_data; in bcdma_alloc_chan_resources()
2621 uc->config.src_thread = ud->psil_base + uc->tchan->id; in pktdma_alloc_chan_resources()
2625 irq_ring_idx = uc->tchan->tflow_id + oes->pktdma_tchan_flow; in pktdma_alloc_chan_resources()
2715 if (uc->tchan) in pktdma_alloc_chan_resources()
2717 "chan%d: tchan%d, tflow%d, Remote thread: 0x%04x\n", in pktdma_alloc_chan_resources()
2718 uc->id, uc->tchan->id, uc->tchan->tflow_id, in pktdma_alloc_chan_resources()
2820 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_alloc_tr_desc()
3247 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_slave_sg_pkt()
3594 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring); in udma_prep_dma_cyclic_pkt()
4371 .psil_base = 0x2000, /* for tchan and rchan, not applicable to bchan */
4571 [RM_RANGE_TCHAN] = "ti,sci-rm-range-tchan",
4657 /* tchan ranges */ in udma_setup_resources()
4666 &rm_res->desc[i], "tchan"); in udma_setup_resources()
4843 /* tchan ranges */ in bcdma_setup_resources()
4854 "tchan"); in bcdma_setup_resources()
5003 /* tchan ranges */ in pktdma_setup_resources()
5011 &rm_res->desc[i], "tchan"); in pktdma_setup_resources()
5127 "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n", in setup_resources()
5138 "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n", in setup_resources()
5149 "Channels: %d (tchan: %u, rchan: %u)\n", in setup_resources()
5280 seq_printf(s, "chan%d pair [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5290 seq_printf(s, "tchan%d [0x%04x -> 0x%04x], ", uc->tchan->id, in udma_dbg_summary_show_chan()
5293 seq_printf(s, "tflow%d, ", uc->tchan->tflow_id); in udma_dbg_summary_show_chan()
5551 struct udma_tchan *tchan = &ud->tchans[i]; in udma_probe() local
5553 tchan->id = i; in udma_probe()
5554 tchan->reg_rt = ud->mmrs[MMR_TCHANRT] + i * 0x1000; in udma_probe()
5577 uc->tchan = NULL; in udma_probe()