Lines Matching refs:rx_chn

304 	struct am65_cpsw_rx_chn *rx_chn = &common->rx_chns;  in am65_cpsw_nuss_rx_push()  local
312 desc_rx = k3_cppi_desc_pool_alloc(rx_chn->desc_pool); in am65_cpsw_nuss_rx_push()
317 desc_dma = k3_cppi_desc_pool_virt2dma(rx_chn->desc_pool, desc_rx); in am65_cpsw_nuss_rx_push()
319 buf_dma = dma_map_single(rx_chn->dma_dev, skb->data, pkt_len, in am65_cpsw_nuss_rx_push()
321 if (unlikely(dma_mapping_error(rx_chn->dma_dev, buf_dma))) { in am65_cpsw_nuss_rx_push()
322 k3_cppi_desc_pool_free(rx_chn->desc_pool, desc_rx); in am65_cpsw_nuss_rx_push()
329 k3_udma_glue_rx_dma_to_cppi5_addr(rx_chn->rx_chn, &buf_dma); in am65_cpsw_nuss_rx_push()
334 return k3_udma_glue_push_rx_chn(rx_chn->rx_chn, 0, desc_rx, desc_dma); in am65_cpsw_nuss_rx_push()
448 k3_udma_glue_enable_rx_chn(common->rx_chns.rx_chn); in am65_cpsw_nuss_common_open()
503 k3_udma_glue_tdown_rx_chn(common->rx_chns.rx_chn, true); in am65_cpsw_nuss_common_stop()
507 k3_udma_glue_reset_rx_chn(common->rx_chns.rx_chn, i, in am65_cpsw_nuss_common_stop()
511 k3_udma_glue_disable_rx_chn(common->rx_chns.rx_chn); in am65_cpsw_nuss_common_stop()
613 struct am65_cpsw_rx_chn *rx_chn = data; in am65_cpsw_nuss_rx_cleanup() local
620 desc_rx = k3_cppi_desc_pool_dma2virt(rx_chn->desc_pool, desc_dma); in am65_cpsw_nuss_rx_cleanup()
624 k3_udma_glue_rx_cppi5_to_dma_addr(rx_chn->rx_chn, &buf_dma); in am65_cpsw_nuss_rx_cleanup()
626 dma_unmap_single(rx_chn->dma_dev, buf_dma, buf_dma_len, DMA_FROM_DEVICE); in am65_cpsw_nuss_rx_cleanup()
627 k3_cppi_desc_pool_free(rx_chn->desc_pool, desc_rx); in am65_cpsw_nuss_rx_cleanup()
680 struct am65_cpsw_rx_chn *rx_chn = &common->rx_chns; in am65_cpsw_nuss_rx_packets() local
694 ret = k3_udma_glue_pop_rx_chn(rx_chn->rx_chn, flow_idx, &desc_dma); in am65_cpsw_nuss_rx_packets()
706 desc_rx = k3_cppi_desc_pool_dma2virt(rx_chn->desc_pool, desc_dma); in am65_cpsw_nuss_rx_packets()
713 k3_udma_glue_rx_cppi5_to_dma_addr(rx_chn->rx_chn, &buf_dma); in am65_cpsw_nuss_rx_packets()
728 dma_unmap_single(rx_chn->dma_dev, buf_dma, buf_dma_len, DMA_FROM_DEVICE); in am65_cpsw_nuss_rx_packets()
730 k3_cppi_desc_pool_free(rx_chn->desc_pool, desc_rx); in am65_cpsw_nuss_rx_packets()
1624 struct am65_cpsw_rx_chn *rx_chn; in am65_cpsw_nuss_free_rx_chns() local
1626 rx_chn = &common->rx_chns; in am65_cpsw_nuss_free_rx_chns()
1628 if (!IS_ERR_OR_NULL(rx_chn->desc_pool)) in am65_cpsw_nuss_free_rx_chns()
1629 k3_cppi_desc_pool_destroy(rx_chn->desc_pool); in am65_cpsw_nuss_free_rx_chns()
1631 if (!IS_ERR_OR_NULL(rx_chn->rx_chn)) in am65_cpsw_nuss_free_rx_chns()
1632 k3_udma_glue_release_rx_chn(rx_chn->rx_chn); in am65_cpsw_nuss_free_rx_chns()
1637 struct am65_cpsw_rx_chn *rx_chn = &common->rx_chns; in am65_cpsw_nuss_init_rx_chns() local
1653 rx_chn->dev = dev; in am65_cpsw_nuss_init_rx_chns()
1654 rx_chn->descs_num = max_desc_num; in am65_cpsw_nuss_init_rx_chns()
1656 rx_chn->rx_chn = k3_udma_glue_request_rx_chn(dev, "rx", &rx_cfg); in am65_cpsw_nuss_init_rx_chns()
1657 if (IS_ERR(rx_chn->rx_chn)) { in am65_cpsw_nuss_init_rx_chns()
1658 ret = dev_err_probe(dev, PTR_ERR(rx_chn->rx_chn), in am65_cpsw_nuss_init_rx_chns()
1662 rx_chn->dma_dev = k3_udma_glue_rx_get_dma_device(rx_chn->rx_chn); in am65_cpsw_nuss_init_rx_chns()
1664 rx_chn->desc_pool = k3_cppi_desc_pool_create_name(rx_chn->dma_dev, in am65_cpsw_nuss_init_rx_chns()
1665 rx_chn->descs_num, in am65_cpsw_nuss_init_rx_chns()
1667 if (IS_ERR(rx_chn->desc_pool)) { in am65_cpsw_nuss_init_rx_chns()
1668 ret = PTR_ERR(rx_chn->desc_pool); in am65_cpsw_nuss_init_rx_chns()
1674 k3_udma_glue_rx_get_flow_id_base(rx_chn->rx_chn); in am65_cpsw_nuss_init_rx_chns()
1701 ret = k3_udma_glue_rx_flow_init(rx_chn->rx_chn, in am65_cpsw_nuss_init_rx_chns()
1709 k3_udma_glue_rx_flow_get_fdq_id(rx_chn->rx_chn, in am65_cpsw_nuss_init_rx_chns()
1712 rx_chn->irq = k3_udma_glue_rx_get_irq(rx_chn->rx_chn, i); in am65_cpsw_nuss_init_rx_chns()
1714 if (rx_chn->irq <= 0) { in am65_cpsw_nuss_init_rx_chns()
1716 rx_chn->irq); in am65_cpsw_nuss_init_rx_chns()