PCI: endpoint: Add helper to get first unreserved BAR
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 14 Jan 2019 11:15:05 +0000 (16:45 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 15 Feb 2019 09:59:40 +0000 (09:59 +0000)
commit1e9efe6c9976552e88c6e6feaca3a78b8cf5aaf6
tree8bb476c19c32d9ae36a7a4d06fdbec23488d583b
parent67c777e6015d857a5e9662c68281d83d946d9b70
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>
drivers/pci/endpoint/pci-epc-core.c
include/linux/pci-epc.h