OPAE Intel FPGA Linux Device Driver Architecture Guide

ID 683857
Date 10/02/2017
Public
Document Table of Contents

1.1.8.1. Enumeration Data Structures

enum fpga_id_type { PARENT_ID, FME_ID, PORT_ID, FPGA_ID_MAX }; static struct idr fpga_ids[FPGA_ID_MAX]; struct fpga_chardev_info { const char *name; dev_t devt; }; struct fpga_chardev_info fpga_chrdevs[] = { { .name = FPGA_FEATURE_DEV_FME }, { .name = FPGA_FEATURE_DEV_PORT }, }; static struct class *fpga_class; static struct pci_device_id cci_pcie_id_tbl[] = { {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_RCiEP0_MCP),}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_VF_MCP),}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_RCiEP0_SKX_P),}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_VF_SKX_P),}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_RCiEP0_DCP),}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIe_DEVICE_ID_VF_DCP),}, {0,} }; static struct pci_driver cci_pci_driver = { .name = DRV_NAME, .id_table = cci_pcie_id_tbl, .probe = cci_pci_probe, .remove = cci_pci_remove, .sriov_configure = cci_pci_sriov_configure }; struct cci_drvdata { int device_id; struct device *fme_dev; struct mutex lock; struct list_head port_dev_list; int released_port_num; struct list_head regions; }; struct build_feature_devs_info { struct pci_dev *pdev; void __iomem *ioaddr; void __iomem *ioend; int current_bar; void __iomem *pfme_hdr; struct device *parent_dev; struct platform_device *feature_dev; };