summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2021-02-28 20:08:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-03-04 12:11:24 +0100
commit12d208815b660ce5ac83503acef5a7aed81afc10 (patch)
treecac659888c2d9fe756c902e3b55bfae20f42908c /include
parent9d708f73f02c53edb0ab29a67f5d8dd584c05fc4 (diff)
downloadbarebox-12d208815b660ce5ac83503acef5a7aed81afc10.tar.gz
barebox-12d208815b660ce5ac83503acef5a7aed81afc10.tar.xz
PCI: port Linux pci_find_capability
Incomding Linux virtio_pci code uses these functions, so port them over. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c742570e36..0c8fed7c8e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -31,6 +31,8 @@
#define PCI_ANY_ID (~0)
+#define PCI_FIND_CAP_TTL 48
+
/*
* The PCI interface treats multi-function devices as independent
* devices. The slot/function address of each device is encoded
@@ -320,6 +322,9 @@ void pci_set_master(struct pci_dev *dev);
void pci_clear_master(struct pci_dev *dev);
int pci_enable_device(struct pci_dev *dev);
+u8 pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
+u8 pci_find_capability(struct pci_dev *dev, int cap);
+
extern void __iomem *pci_iomap(struct pci_dev *dev, int bar);
/*