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

Function dpaa2_qdma_probe

dpdk/drivers/dma/dpaa2/dpaa2_qdma.c:1630–1668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1628}
1629
1630static int
1631dpaa2_qdma_probe(struct rte_dpaa2_driver *dpaa2_drv,
1632 struct rte_dpaa2_device *dpaa2_dev)
1633{
1634 struct rte_dma_dev *dmadev;
1635 int ret;
1636
1637 DPAA2_QDMA_FUNC_TRACE();
1638
1639 RTE_SET_USED(dpaa2_drv);
1640
1641 dmadev = rte_dma_pmd_allocate(dpaa2_dev->device.name,
1642 rte_socket_id(),
1643 sizeof(struct dpaa2_dpdmai_dev));
1644 if (!dmadev) {
1645 DPAA2_QDMA_ERR("Unable to allocate dmadevice");
1646 return -EINVAL;
1647 }
1648
1649 dpaa2_dev->dmadev = dmadev;
1650 dmadev->dev_ops = &dpaa2_qdma_ops;
1651 dmadev->device = &dpaa2_dev->device;
1652 dmadev->fp_obj->dev_private = dmadev->data->dev_private;
1653 dmadev->fp_obj->copy = dpaa2_qdma_enqueue;
1654 dmadev->fp_obj->submit = dpaa2_qdma_submit;
1655 dmadev->fp_obj->completed = dpaa2_qdma_dequeue;
1656 dmadev->fp_obj->completed_status = dpaa2_qdma_dequeue_status;
1657 dmadev->fp_obj->burst_capacity = dpaa2_qdma_burst_capacity;
1658
1659 /* Invoke PMD device initialization function */
1660 ret = dpaa2_dpdmai_dev_init(dmadev, dpaa2_dev->object_id);
1661 if (ret) {
1662 rte_dma_pmd_release(dpaa2_dev->device.name);
1663 return ret;
1664 }
1665
1666 dmadev->state = RTE_DMA_DEV_READY;
1667 return 0;
1668}
1669
1670static int
1671dpaa2_qdma_remove(struct rte_dpaa2_device *dpaa2_dev)

Callers

nothing calls this directly

Calls 4

rte_dma_pmd_allocateFunction · 0.85
rte_socket_idFunction · 0.85
dpaa2_dpdmai_dev_initFunction · 0.85
rte_dma_pmd_releaseFunction · 0.85

Tested by

no test coverage detected