Lines Matching defs:tchan
288 struct udma_tchan *tchan;
359 if (!uc->tchan)
361 return udma_read(uc->tchan->reg_rt, reg);
366 if (!uc->tchan)
368 udma_write(uc->tchan->reg_rt, reg, val);
374 if (!uc->tchan)
376 udma_update_bits(uc->tchan->reg_rt, reg, mask, val);
608 if (uc->tchan)
663 ring = uc->tchan->t_ring;
703 ring = uc->tchan->tc_ring;
740 if (uc->tchan) {
741 ring1 = uc->tchan->t_ring;
742 ring2 = uc->tchan->tc_ring;
781 if (uc->tchan) {
1364 UDMA_RESERVE_RESOURCE(tchan);
1395 uc->tchan = uc->bchan;
1405 if (uc->tchan) {
1406 dev_dbg(ud->dev, "chan%d: already have tchan%d allocated\n",
1407 uc->id, uc->tchan->id);
1416 uc->tchan = __udma_reserve_tchan(ud, uc->config.channel_tpl,
1418 if (IS_ERR(uc->tchan)) {
1419 ret = PTR_ERR(uc->tchan);
1420 uc->tchan = NULL;
1431 tflow_id = uc->tchan->id;
1435 clear_bit(uc->tchan->id, ud->tchan_map);
1436 uc->tchan = NULL;
1440 uc->tchan->tflow_id = tflow_id;
1443 uc->tchan->tflow_id = -1;
1481 if ((uc->tchan && uc->rchan) && uc->tchan->id == uc->rchan->id) {
1483 uc->id, uc->tchan->id);
1487 if (uc->tchan) {
1488 dev_err(ud->dev, "chan%d: already have tchan%d allocated\n",
1489 uc->id, uc->tchan->id);
1501 * Note: in UDMAP the channel TPL is symmetric between tchan and rchan
1515 uc->tchan = &ud->tchans[chan_id];
1519 uc->tchan->tflow_id = -1;
1559 uc->tchan = NULL;
1579 if (uc->tchan) {
1580 dev_dbg(ud->dev, "chan%d: put tchan%d\n", uc->id,
1581 uc->tchan->id);
1582 clear_bit(uc->tchan->id, ud->tchan_map);
1584 if (uc->tchan->tflow_id >= 0)
1585 clear_bit(uc->tchan->tflow_id, ud->tflow_map);
1587 uc->tchan = NULL;
1664 if (!uc->tchan)
1667 k3_ringacc_ring_free(uc->tchan->t_ring);
1668 k3_ringacc_ring_free(uc->tchan->tc_ring);
1669 uc->tchan->t_ring = NULL;
1670 uc->tchan->tc_ring = NULL;
1679 struct udma_tchan *tchan;
1686 tchan = uc->tchan;
1687 if (tchan->tflow_id >= 0)
1688 ring_idx = tchan->tflow_id;
1690 ring_idx = ud->bchan_cnt + tchan->id;
1693 &tchan->t_ring,
1694 &tchan->tc_ring);
1713 ret = k3_ringacc_ring_cfg(tchan->t_ring, &ring_cfg);
1714 ret |= k3_ringacc_ring_cfg(tchan->tc_ring, &ring_cfg);
1722 k3_ringacc_ring_free(uc->tchan->tc_ring);
1723 uc->tchan->tc_ring = NULL;
1724 k3_ringacc_ring_free(uc->tchan->t_ring);
1725 uc->tchan->t_ring = NULL;
1870 struct udma_tchan *tchan = uc->tchan;
1877 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring);
1882 tpl = udma_get_chan_tpl_index(&ud->tchan_tpl, tchan->id);
1889 req_tx.index = tchan->id;
1901 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret);
1962 struct udma_tchan *tchan = uc->tchan;
1963 int tc_ring = k3_ringacc_get_ring_id(tchan->tc_ring);
1979 req_tx.index = tchan->id;
1995 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret);
2005 struct udma_tchan *tchan = uc->tchan;
2011 req_tx.index = tchan->id;
2022 dev_err(ud->dev, "tchan%d cfg failed %d\n", tchan->id, ret);
2241 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2245 irq_ring = uc->tchan->tc_ring;
2246 irq_udma_idx = uc->tchan->id;
2259 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2263 irq_ring = uc->tchan->tc_ring;
2264 irq_udma_idx = uc->tchan->id;
2426 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2430 irq_ring_idx = uc->tchan->id + oes->bcdma_tchan_ring;
2431 irq_udma_idx = uc->tchan->id + oes->bcdma_tchan_data;
2621 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2625 irq_ring_idx = uc->tchan->tflow_id + oes->pktdma_tchan_flow;
2715 if (uc->tchan)
2717 "chan%d: tchan%d, tflow%d, Remote thread: 0x%04x\n",
2718 uc->id, uc->tchan->id, uc->tchan->tflow_id,
2820 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring);
3234 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring);
3563 ring_id = k3_ringacc_get_ring_id(uc->tchan->tc_ring);
4339 .psil_base = 0x2000, /* for tchan and rchan, not applicable to bchan */
4518 [RM_RANGE_TCHAN] = "ti,sci-rm-range-tchan",
4604 /* tchan ranges */
4613 &rm_res->desc[i], "tchan");
4790 /* tchan ranges */
4801 "tchan");
4950 /* tchan ranges */
4958 &rm_res->desc[i], "tchan");
5074 "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
5085 "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
5096 "Channels: %d (tchan: %u, rchan: %u)\n",
5227 seq_printf(s, "chan%d pair [0x%04x -> 0x%04x], ", uc->tchan->id,
5237 seq_printf(s, "tchan%d [0x%04x -> 0x%04x], ", uc->tchan->id,
5240 seq_printf(s, "tflow%d, ", uc->tchan->tflow_id);
5498 struct udma_tchan *tchan = &ud->tchans[i];
5500 tchan->id = i;
5501 tchan->reg_rt = ud->mmrs[MMR_TCHANRT] + i * 0x1000;
5524 uc->tchan = NULL;