Lines Matching refs:hwdesc
234 struct udma_hwdesc hwdesc[]; member
496 return d->hwdesc[idx].cppi5_desc_paddr; in udma_curr_cppi5_desc_paddr()
501 return d->hwdesc[idx].cppi5_desc_vaddr; in udma_curr_cppi5_desc_vaddr()
537 if (!d->hwdesc[i].cppi5_desc_vaddr) in udma_free_hwdesc()
541 d->hwdesc[i].cppi5_desc_vaddr, in udma_free_hwdesc()
542 d->hwdesc[i].cppi5_desc_paddr); in udma_free_hwdesc()
544 d->hwdesc[i].cppi5_desc_vaddr = NULL; in udma_free_hwdesc()
546 } else if (d->hwdesc[0].cppi5_desc_vaddr) { in udma_free_hwdesc()
547 dma_free_coherent(uc->dma_dev, d->hwdesc[0].cppi5_desc_size, in udma_free_hwdesc()
548 d->hwdesc[0].cppi5_desc_vaddr, in udma_free_hwdesc()
549 d->hwdesc[0].cppi5_desc_paddr); in udma_free_hwdesc()
551 d->hwdesc[0].cppi5_desc_vaddr = NULL; in udma_free_hwdesc()
1046 h_desc = d->hwdesc[d->desc_idx].cppi5_desc_vaddr; in udma_cyclic_packet_elapsed()
1054 struct cppi5_host_desc_t *h_desc = d->hwdesc[0].cppi5_desc_vaddr; in udma_fetch_epib()
2758 struct udma_hwdesc *hwdesc; in udma_alloc_tr_desc() local
2776 d = kzalloc(sizeof(*d) + sizeof(d->hwdesc[0]), GFP_NOWAIT); in udma_alloc_tr_desc()
2783 hwdesc = &d->hwdesc[0]; in udma_alloc_tr_desc()
2787 hwdesc->cppi5_desc_size = uc->config.hdesc_size; in udma_alloc_tr_desc()
2788 hwdesc->cppi5_desc_vaddr = dma_pool_zalloc(uc->hdesc_pool, in udma_alloc_tr_desc()
2790 &hwdesc->cppi5_desc_paddr); in udma_alloc_tr_desc()
2792 hwdesc->cppi5_desc_size = cppi5_trdesc_calc_size(tr_size, in udma_alloc_tr_desc()
2794 hwdesc->cppi5_desc_size = ALIGN(hwdesc->cppi5_desc_size, in udma_alloc_tr_desc()
2796 hwdesc->cppi5_desc_vaddr = dma_alloc_coherent(uc->ud->dev, in udma_alloc_tr_desc()
2797 hwdesc->cppi5_desc_size, in udma_alloc_tr_desc()
2798 &hwdesc->cppi5_desc_paddr, in udma_alloc_tr_desc()
2802 if (!hwdesc->cppi5_desc_vaddr) { in udma_alloc_tr_desc()
2808 hwdesc->tr_req_base = hwdesc->cppi5_desc_vaddr + tr_size; in udma_alloc_tr_desc()
2810 hwdesc->tr_resp_base = hwdesc->tr_req_base + tr_size * tr_count; in udma_alloc_tr_desc()
2812 tr_desc = hwdesc->cppi5_desc_vaddr; in udma_alloc_tr_desc()
2911 tr_req = d->hwdesc[0].tr_req_base; in udma_prep_slave_sg_tr()
3045 tr_req = d->hwdesc[0].tr_req_base; in udma_prep_slave_sg_triggered_tr()
3224 d = kzalloc(struct_size(d, hwdesc, sglen), GFP_NOWAIT); in udma_prep_slave_sg_pkt()
3242 struct udma_hwdesc *hwdesc = &d->hwdesc[i]; in udma_prep_slave_sg_pkt() local
3247 hwdesc->cppi5_desc_vaddr = dma_pool_zalloc(uc->hdesc_pool, in udma_prep_slave_sg_pkt()
3249 &hwdesc->cppi5_desc_paddr); in udma_prep_slave_sg_pkt()
3250 if (!hwdesc->cppi5_desc_vaddr) { in udma_prep_slave_sg_pkt()
3260 hwdesc->cppi5_desc_size = uc->config.hdesc_size; in udma_prep_slave_sg_pkt()
3261 desc = hwdesc->cppi5_desc_vaddr; in udma_prep_slave_sg_pkt()
3281 hwdesc->cppi5_desc_paddr | asel); in udma_prep_slave_sg_pkt()
3297 h_desc = d->hwdesc[0].cppi5_desc_vaddr; in udma_prep_slave_sg_pkt()
3321 h_desc = d->hwdesc[0].cppi5_desc_vaddr; in udma_attach_metadata()
3349 h_desc = d->hwdesc[0].cppi5_desc_vaddr; in udma_get_metadata_ptr()
3378 h_desc = d->hwdesc[0].cppi5_desc_vaddr; in udma_set_metadata_len()
3494 tr_req = d->hwdesc[0].tr_req_base; in udma_prep_dma_cyclic_tr()
3553 d = kzalloc(struct_size(d, hwdesc, periods), GFP_NOWAIT); in udma_prep_dma_cyclic_pkt()
3569 struct udma_hwdesc *hwdesc = &d->hwdesc[i]; in udma_prep_dma_cyclic_pkt() local
3573 hwdesc->cppi5_desc_vaddr = dma_pool_zalloc(uc->hdesc_pool, in udma_prep_dma_cyclic_pkt()
3575 &hwdesc->cppi5_desc_paddr); in udma_prep_dma_cyclic_pkt()
3576 if (!hwdesc->cppi5_desc_vaddr) { in udma_prep_dma_cyclic_pkt()
3585 hwdesc->cppi5_desc_size = uc->config.hdesc_size; in udma_prep_dma_cyclic_pkt()
3586 h_desc = hwdesc->cppi5_desc_vaddr; in udma_prep_dma_cyclic_pkt()
3717 tr_req = d->hwdesc[0].tr_req_base; in udma_prep_dma_memcpy()
3996 status = d->hwdesc[0].tr_resp_base->status; in udma_desc_pre_callback()
5119 struct udma_hwdesc *hwdesc; in udma_setup_rx_flush() local
5136 hwdesc = &rx_flush->hwdescs[0]; in udma_setup_rx_flush()
5138 hwdesc->cppi5_desc_size = cppi5_trdesc_calc_size(tr_size, 1); in udma_setup_rx_flush()
5139 hwdesc->cppi5_desc_size = ALIGN(hwdesc->cppi5_desc_size, in udma_setup_rx_flush()
5142 hwdesc->cppi5_desc_vaddr = devm_kzalloc(dev, hwdesc->cppi5_desc_size, in udma_setup_rx_flush()
5144 if (!hwdesc->cppi5_desc_vaddr) in udma_setup_rx_flush()
5147 hwdesc->cppi5_desc_paddr = dma_map_single(dev, hwdesc->cppi5_desc_vaddr, in udma_setup_rx_flush()
5148 hwdesc->cppi5_desc_size, in udma_setup_rx_flush()
5150 if (dma_mapping_error(dev, hwdesc->cppi5_desc_paddr)) in udma_setup_rx_flush()
5154 hwdesc->tr_req_base = hwdesc->cppi5_desc_vaddr + tr_size; in udma_setup_rx_flush()
5156 hwdesc->tr_resp_base = hwdesc->tr_req_base + tr_size; in udma_setup_rx_flush()
5158 tr_desc = hwdesc->cppi5_desc_vaddr; in udma_setup_rx_flush()
5163 tr_req = hwdesc->tr_req_base; in udma_setup_rx_flush()
5172 dma_sync_single_for_device(dev, hwdesc->cppi5_desc_paddr, in udma_setup_rx_flush()
5173 hwdesc->cppi5_desc_size, DMA_TO_DEVICE); in udma_setup_rx_flush()
5176 hwdesc = &rx_flush->hwdescs[1]; in udma_setup_rx_flush()
5177 hwdesc->cppi5_desc_size = ALIGN(sizeof(struct cppi5_host_desc_t) + in udma_setup_rx_flush()
5182 hwdesc->cppi5_desc_vaddr = devm_kzalloc(dev, hwdesc->cppi5_desc_size, in udma_setup_rx_flush()
5184 if (!hwdesc->cppi5_desc_vaddr) in udma_setup_rx_flush()
5187 hwdesc->cppi5_desc_paddr = dma_map_single(dev, hwdesc->cppi5_desc_vaddr, in udma_setup_rx_flush()
5188 hwdesc->cppi5_desc_size, in udma_setup_rx_flush()
5190 if (dma_mapping_error(dev, hwdesc->cppi5_desc_paddr)) in udma_setup_rx_flush()
5193 desc = hwdesc->cppi5_desc_vaddr; in udma_setup_rx_flush()
5202 dma_sync_single_for_device(dev, hwdesc->cppi5_desc_paddr, in udma_setup_rx_flush()
5203 hwdesc->cppi5_desc_size, DMA_TO_DEVICE); in udma_setup_rx_flush()