MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpaa_qdma_probe

Function dpaa_qdma_probe

dpdk/drivers/dma/dpaa/dpaa_qdma.c:1015–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015static int
1016dpaa_qdma_probe(__rte_unused struct rte_dpaa_driver *dpaa_drv,
1017 struct rte_dpaa_device *dpaa_dev)
1018{
1019 struct rte_dma_dev *dmadev;
1020 int ret;
1021
1022 dmadev = rte_dma_pmd_allocate(dpaa_dev->device.name,
1023 rte_socket_id(),
1024 sizeof(struct fsl_qdma_engine));
1025 if (!dmadev) {
1026 DPAA_QDMA_ERR("Unable to allocate dmadevice");
1027 return -EINVAL;
1028 }
1029
1030 dpaa_dev->dmadev = dmadev;
1031 dmadev->dev_ops = &dpaa_qdma_ops;
1032 dmadev->device = &dpaa_dev->device;
1033 dmadev->fp_obj->dev_private = dmadev->data->dev_private;
1034 dmadev->fp_obj->copy = dpaa_qdma_enqueue;
1035 dmadev->fp_obj->submit = dpaa_qdma_submit;
1036 dmadev->fp_obj->completed = dpaa_qdma_dequeue;
1037 dmadev->fp_obj->completed_status = dpaa_qdma_dequeue_status;
1038
1039 /* Invoke PMD device initialization function */
1040 ret = dpaa_qdma_init(dmadev);
1041 if (ret) {
1042 (void)rte_dma_pmd_release(dpaa_dev->device.name);
1043 return ret;
1044 }
1045
1046 dmadev->state = RTE_DMA_DEV_READY;
1047 return 0;
1048}
1049
1050static int
1051dpaa_qdma_remove(struct rte_dpaa_device *dpaa_dev)

Callers

nothing calls this directly

Calls 4

rte_dma_pmd_allocateFunction · 0.85
rte_socket_idFunction · 0.85
dpaa_qdma_initFunction · 0.85
rte_dma_pmd_releaseFunction · 0.85

Tested by

no test coverage detected