summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-05 12:25:24 -0700
committerSimon Glass <sjg@chromium.org>2015-04-16 19:27:42 -0600
commitaab6724c90c39e1f599d4ee6354c9f2cf553dc61 (patch)
treecc3a3e0c5df6dcfc97a0fb0b80d11ee75612a5ed /include/pci.h
parentfa67f90fc32adaa0c8001e3ae49e81c91d0c9d92 (diff)
downloadu-boot-imx-aab6724c90c39e1f599d4ee6354c9f2cf553dc61.zip
u-boot-imx-aab6724c90c39e1f599d4ee6354c9f2cf553dc61.tar.gz
u-boot-imx-aab6724c90c39e1f599d4ee6354c9f2cf553dc61.tar.bz2
dm: pci: Move common PCI functions into their own file
Driver model will share many functions with the existing PCI implementation. Move these into their own file to avoid duplication and confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index 004a048..4e8826a 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -705,5 +705,19 @@ u32 pci_read_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum);
*/
int pciauto_setup_rom(struct pci_controller *hose, pci_dev_t dev);
+/**
+ * pci_hose_find_devices() - Find devices by vendor/device ID
+ *
+ * @hose: PCI hose to search
+ * @busnum: Bus number to search
+ * @ids: PCI vendor/device IDs to look for, terminated by 0, 0 record
+ * @indexp: Pointer to device index to find. To find the first matching
+ * device, pass 0; to find the second, pass 1, etc. This
+ * parameter is decremented for each non-matching device so
+ * can be called repeatedly.
+ */
+pci_dev_t pci_hose_find_devices(struct pci_controller *hose, int busnum,
+ struct pci_device_id *ids, int *indexp);
+
#endif /* __ASSEMBLY__ */
#endif /* _PCI_H */