1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
7 #include <rte_bus_pci.h>
8 #include <rte_common.h>
10 #include <rte_eventdev_pmd_pci.h>
13 #include "otx2_evdev.h"
16 otx2_sso_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
18 return rte_event_pmd_pci_probe(pci_drv, pci_dev,
19 sizeof(struct otx2_sso_evdev),
24 otx2_sso_remove(struct rte_pci_device *pci_dev)
26 return rte_event_pmd_pci_remove(pci_dev, otx2_sso_fini);
29 static const struct rte_pci_id pci_sso_map[] = {
31 RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
32 PCI_DEVID_OCTEONTX2_RVU_SSO_TIM_PF)
39 static struct rte_pci_driver pci_sso = {
40 .id_table = pci_sso_map,
41 .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_IOVA_AS_VA,
42 .probe = otx2_sso_probe,
43 .remove = otx2_sso_remove,
47 otx2_sso_init(struct rte_eventdev *event_dev)
49 RTE_SET_USED(event_dev);
50 /* For secondary processes, the primary has done all the work */
51 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
58 otx2_sso_fini(struct rte_eventdev *event_dev)
60 RTE_SET_USED(event_dev);
61 /* For secondary processes, nothing to be done */
62 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
68 RTE_PMD_REGISTER_PCI(event_octeontx2, pci_sso);
69 RTE_PMD_REGISTER_PCI_TABLE(event_octeontx2, pci_sso_map);
70 RTE_PMD_REGISTER_KMOD_DEP(event_octeontx2, "vfio-pci");