summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.h
diff options
context:
space:
mode:
authorYu Zhao <yu.zhao@intel.com>2008-11-21 19:41:27 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 20:13:04 +0100
commit613e7ed6f72b1a115f7ece8ce1b66cf095de1348 (patch)
tree2af16f01cbf78f1de6b858788091a72fa57af6c8 /drivers/pci/pci.h
parentPCI: allow pci_alloc_child_bus() to handle a NULL bridge (diff)
downloadlinux-613e7ed6f72b1a115f7ece8ce1b66cf095de1348.tar.xz
linux-613e7ed6f72b1a115f7ece8ce1b66cf095de1348.zip
PCI: add a new function to map BAR offsets
Add a function to map a given resource number to a corresponding register so drivers can get the offset and type of device specific BARs. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r--drivers/pci/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d881fde8bb82..c4f4a1e6ea28 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -171,6 +171,8 @@ enum pci_bar_type {
extern int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
struct resource *res, unsigned int reg);
+extern int pci_resource_bar(struct pci_dev *dev, int resno,
+ enum pci_bar_type *type);
extern void pci_enable_ari(struct pci_dev *dev);
/**
* pci_ari_enabled - query ARI forwarding status