summaryrefslogtreecommitdiffstats
path: root/include/linux/pci-epc.h
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2019-01-14 12:15:05 +0100
committerLorenzo Pieralisi2019-02-15 10:59:40 +0100
commit1e9efe6c9976552e88c6e6feaca3a78b8cf5aaf6 (patch)
tree8bb476c19c32d9ae36a7a4d06fdbec23488d583b /include/linux/pci-epc.h
parentPCI: cadence: Populate ->get_features() cdns_pcie_epc_ops (diff)
downloadkernel-qcow2-linux-1e9efe6c9976552e88c6e6feaca3a78b8cf5aaf6.tar.gz
kernel-qcow2-linux-1e9efe6c9976552e88c6e6feaca3a78b8cf5aaf6.tar.xz
kernel-qcow2-linux-1e9efe6c9976552e88c6e6feaca3a78b8cf5aaf6.zip
PCI: endpoint: Add helper to get first unreserved BAR
Add a helper function pci_epc_get_first_free_bar() to get the first unreserved BAR that can be used for endpoint function. 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>
Diffstat (limited to 'include/linux/pci-epc.h')
-rw-r--r--include/linux/pci-epc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index 79fbcf94e14d..94e1ecff98ce 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -180,6 +180,8 @@ int pci_epc_start(struct pci_epc *epc);
void pci_epc_stop(struct pci_epc *epc);
const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc,
u8 func_no);
+unsigned int pci_epc_get_first_free_bar(const struct pci_epc_features
+ *epc_features);
struct pci_epc *pci_epc_get(const char *epc_name);
void pci_epc_put(struct pci_epc *epc);