PCI: cadence: Populate ->get_features() cdns_pcie_epc_ops
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 14 Jan 2019 11:15:04 +0000 (16:45 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 14 Feb 2019 16:10:13 +0000 (16:10 +0000)
Populate ->get_features() dw_pcie_ep_ops to return the EPC features
supported by Cadence PCIe endpoint controller.

Tested-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pcie-cadence-ep.c

index c3a0889..14c2545 100644 (file)
@@ -411,6 +411,18 @@ static int cdns_pcie_ep_start(struct pci_epc *epc)
        return 0;
 }
 
+static const struct pci_epc_features cdns_pcie_epc_features = {
+       .linkup_notifier = false,
+       .msi_capable = true,
+       .msix_capable = false,
+};
+
+static const struct pci_epc_features*
+cdns_pcie_ep_get_features(struct pci_epc *epc, u8 func_no)
+{
+       return &cdns_pcie_epc_features;
+}
+
 static const struct pci_epc_ops cdns_pcie_epc_ops = {
        .write_header   = cdns_pcie_ep_write_header,
        .set_bar        = cdns_pcie_ep_set_bar,
@@ -421,6 +433,7 @@ static const struct pci_epc_ops cdns_pcie_epc_ops = {
        .get_msi        = cdns_pcie_ep_get_msi,
        .raise_irq      = cdns_pcie_ep_raise_irq,
        .start          = cdns_pcie_ep_start,
+       .get_features   = cdns_pcie_ep_get_features,
 };
 
 static const struct of_device_id cdns_pcie_ep_of_match[] = {