Lines Matching refs:config

306 	struct udma_chan_config config;
461 memset(&uc->config, 0, sizeof(uc->config));
462 uc->config.remote_thread_id = -1;
463 uc->config.mapped_channel_id = -1;
464 uc->config.default_flow_id = -1;
474 if (uc->config.dir == DMA_MEM_TO_DEV || uc->config.dir == DMA_MEM_TO_MEM) {
483 if (uc->config.dir == DMA_DEV_TO_MEM || uc->config.dir == DMA_MEM_TO_MEM) {
623 switch (uc->config.dir) {
648 return uc->ud->rx_flush.hwdescs[uc->config.pkt_mode].cppi5_desc_paddr;
657 switch (uc->config.dir) {
683 if (uc->config.dir != DMA_DEV_TO_MEM)
697 switch (uc->config.dir) {
731 switch (uc->config.dir) {
767 if (uc->config.ep_type != PSIL_EP_NATIVE)
772 if (!uc->bchan && uc->config.ep_type != PSIL_EP_NATIVE)
814 switch (uc->config.dir) {
839 memcpy(&ucc_backup, &uc->config, sizeof(uc->config));
843 memcpy(&uc->config, &ucc_backup, sizeof(uc->config));
852 if (uc->config.dir == DMA_DEV_TO_MEM)
865 struct udma_chan_config *ucc = &uc->config;
887 if (uc->config.ep_type == PSIL_EP_NATIVE)
925 if (uc->config.ep_type == PSIL_EP_PDMA_XY) {
931 if (uc->config.enable_acc32)
933 if (uc->config.enable_burst)
960 if (uc->config.ep_type == PSIL_EP_PDMA_XY) {
964 if (uc->config.enable_acc32)
966 if (uc->config.enable_burst)
1010 switch (uc->config.dir) {
1069 if (uc->config.ep_type == PSIL_EP_NATIVE ||
1070 uc->config.dir != DMA_MEM_TO_DEV || !(uc->config.tx_flags & DMA_PREP_INTERRUPT))
1383 if (uc->config.tr_trigger_type)
1416 uc->tchan = __udma_reserve_tchan(ud, uc->config.channel_tpl,
1417 uc->config.mapped_channel_id);
1428 if (uc->config.default_flow_id >= 0)
1429 tflow_id = uc->config.default_flow_id;
1465 uc->rchan = __udma_reserve_rchan(ud, uc->config.channel_tpl,
1466 uc->config.mapped_channel_id);
1708 k3_configure_chan_coherency(&uc->vc.chan, uc->config.asel);
1709 ring_cfg.asel = uc->config.asel;
1764 if (uc->config.dir == DMA_MEM_TO_MEM)
1767 if (uc->config.default_flow_id >= 0)
1768 ret = udma_get_rflow(uc, uc->config.default_flow_id);
1795 if (uc->config.pkt_mode)
1805 k3_configure_chan_coherency(&uc->vc.chan, uc->config.asel);
1806 ring_cfg.asel = uc->config.asel;
1968 if (uc->config.pkt_mode) {
1970 fetch_size = cppi5_hdesc_calc_size(uc->config.needs_epib,
1971 uc->config.psd_size, 0);
1981 req_tx.tx_supr_tdpkt = uc->config.notdpkt;
1984 req_tx.tx_atype = uc->config.atype;
1985 if (uc->config.ep_type == PSIL_EP_PDMA_XY &&
2012 req_tx.tx_supr_tdpkt = uc->config.notdpkt;
2042 if (uc->config.pkt_mode) {
2044 fetch_size = cppi5_hdesc_calc_size(uc->config.needs_epib,
2045 uc->config.psd_size, 0);
2057 req_rx.rx_atype = uc->config.atype;
2083 if (uc->config.needs_epib)
2087 if (uc->config.psd_size)
2105 dev_err(ud->dev, "flow%d config failed: %d\n", rchan->id, ret);
2157 if (uc->config.needs_epib)
2161 if (uc->config.psd_size)
2170 dev_err(ud->dev, "flow%d config failed: %d\n", uc->rflow->id,
2187 if (uc->config.pkt_mode || uc->config.dir == DMA_MEM_TO_MEM) {
2190 if (uc->config.dir == DMA_MEM_TO_MEM) {
2191 uc->config.hdesc_size = cppi5_trdesc_calc_size(
2193 uc->config.pkt_mode = false;
2199 uc->config.hdesc_size,
2219 switch (uc->config.dir) {
2241 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2242 uc->config.dst_thread = (ud->psil_base + uc->rchan->id) |
2259 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2260 uc->config.dst_thread = uc->config.remote_thread_id;
2261 uc->config.dst_thread |= K3_PSIL_DST_THREAD_ID_OFFSET;
2277 uc->config.src_thread = uc->config.remote_thread_id;
2278 uc->config.dst_thread = (ud->psil_base + uc->rchan->id) |
2289 __func__, uc->id, uc->config.dir);
2310 ret = navss_psil_pair(ud, uc->config.src_thread, uc->config.dst_thread);
2313 uc->config.src_thread, uc->config.dst_thread);
2335 if (is_slave_direction(uc->config.dir) && !uc->config.pkt_mode) {
2365 navss_psil_unpair(ud, uc->config.src_thread, uc->config.dst_thread);
2390 uc->config.pkt_mode = false;
2400 switch (uc->config.dir) {
2422 uc->config.remote_thread_id = -1;
2426 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2427 uc->config.dst_thread = uc->config.remote_thread_id;
2428 uc->config.dst_thread |= K3_PSIL_DST_THREAD_ID_OFFSET;
2442 uc->config.remote_thread_id = -1;
2446 uc->config.src_thread = uc->config.remote_thread_id;
2447 uc->config.dst_thread = (ud->psil_base + uc->rchan->id) |
2458 __func__, uc->id, uc->config.dir);
2477 if (uc->config.dir == DMA_MEM_TO_MEM && !uc->config.tr_trigger_type) {
2478 uc->config.hdesc_size = cppi5_trdesc_calc_size(
2482 uc->config.hdesc_size,
2494 } else if (uc->config.dir != DMA_MEM_TO_MEM) {
2496 ret = navss_psil_pair(ud, uc->config.src_thread,
2497 uc->config.dst_thread);
2501 uc->config.src_thread, uc->config.dst_thread);
2524 if (is_slave_direction(uc->config.dir)) {
2557 navss_psil_unpair(ud, uc->config.src_thread,
2558 uc->config.dst_thread);
2584 if (uc->config.tr_trigger_type != 1 && uc->config.tr_trigger_type != 2)
2588 trigger_event += (uc->bchan->id * 2) + uc->config.tr_trigger_type - 1;
2609 switch (uc->config.dir) {
2617 uc->config.remote_thread_id = -1;
2621 uc->config.src_thread = ud->psil_base + uc->tchan->id;
2622 uc->config.dst_thread = uc->config.remote_thread_id;
2623 uc->config.dst_thread |= K3_PSIL_DST_THREAD_ID_OFFSET;
2636 uc->config.remote_thread_id = -1;
2640 uc->config.src_thread = uc->config.remote_thread_id;
2641 uc->config.dst_thread = (ud->psil_base + uc->rchan->id) |
2651 __func__, uc->id, uc->config.dir);
2671 uc->config.hdesc_size, ud->desc_align,
2684 ret = navss_psil_pair(ud, uc->config.src_thread, uc->config.dst_thread);
2687 uc->config.src_thread, uc->config.dst_thread);
2719 uc->config.remote_thread_id);
2724 uc->config.remote_thread_id);
2730 navss_psil_unpair(ud, uc->config.src_thread, uc->config.dst_thread);
2787 hwdesc->cppi5_desc_size = uc->config.hdesc_size;
2909 asel = (u64)uc->config.asel << K3_ADDRESS_ASEL_SHIFT;
3041 asel = (u64)uc->config.asel << K3_ADDRESS_ASEL_SHIFT;
3065 uc->config.tr_trigger_type,
3111 uc->config.tr_trigger_type,
3162 if (uc->config.ep_type != PSIL_EP_PDMA_XY)
3194 if (uc->config.pkt_mode || !uc->cyclic) {
3202 if (uc->config.dir == DMA_DEV_TO_MEM &&
3239 asel = (u64)uc->config.asel << K3_ADDRESS_ASEL_SHIFT;
3260 hwdesc->cppi5_desc_size = uc->config.hdesc_size;
3312 if (!uc->config.pkt_mode || !uc->config.metadata_size)
3315 if (!data || len > uc->config.metadata_size)
3318 if (uc->config.needs_epib && len < CPPI5_INFO0_HDESC_EPIB_SIZE)
3325 if (uc->config.needs_epib)
3330 if (uc->config.needs_epib)
3346 if (!uc->config.pkt_mode || !uc->config.metadata_size)
3351 *max_len = uc->config.metadata_size;
3369 if (!uc->config.pkt_mode || !uc->config.metadata_size)
3372 if (payload_len > uc->config.metadata_size)
3375 if (uc->config.needs_epib && payload_len < CPPI5_INFO0_HDESC_EPIB_SIZE)
3380 if (uc->config.needs_epib) {
3407 if (dir != uc->config.dir &&
3408 (uc->config.dir == DMA_MEM_TO_MEM && !uc->config.tr_trigger_type)) {
3412 dmaengine_get_direction_text(uc->config.dir),
3431 uc->config.tx_flags = tx_flags;
3433 if (uc->config.pkt_mode)
3436 else if (is_slave_direction(uc->config.dir))
3461 if (uc->config.metadata_size)
3499 ((u64)uc->config.asel << K3_ADDRESS_ASEL_SHIFT);
3566 buf_addr |= (u64)uc->config.asel << K3_ADDRESS_ASEL_SHIFT;
3585 hwdesc->cppi5_desc_size = uc->config.hdesc_size;
3615 if (dir != uc->config.dir) {
3619 dmaengine_get_direction_text(uc->config.dir),
3640 if (uc->config.pkt_mode)
3666 if (uc->config.metadata_size)
3684 if (uc->config.dir != DMA_MEM_TO_MEM) {
3688 dmaengine_get_direction_text(uc->config.dir),
3757 if (uc->config.metadata_size)
3815 if (uc->config.ep_type != PSIL_EP_NATIVE) {
3825 if (uc->config.ep_type != PSIL_EP_NATIVE) {
3841 if (!residue && (uc->config.dir == DMA_DEV_TO_MEM || !delay)) {
3863 switch (uc->config.dir) {
3891 switch (uc->config.dir) {
4070 navss_psil_unpair(ud, uc->config.src_thread,
4071 uc->config.dst_thread);
4114 ucc = &uc->config;
5210 struct udma_chan_config *ucc = &uc->config;
5218 dmaengine_get_direction_text(uc->config.dir));
5220 switch (uc->config.dir) {
5526 uc->config.remote_thread_id = -1;
5527 uc->config.mapped_channel_id = -1;
5528 uc->config.default_flow_id = -1;
5529 uc->config.dir = DMA_MEM_TO_MEM;
5571 memcpy(&uc->backup_config, &uc->config,
5594 memcpy(&uc->config, &uc->backup_config,