diff options
| author | Thierry Reding <[email protected]> | 2014-11-12 18:26:49 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2014-11-23 06:49:01 -0500 |
| commit | 4efe52bf23c96cee7052273bd8549caee4d0fdc2 (patch) | |
| tree | 0729647bcc94f7df595ca3071a36fd8ccc42baa2 /drivers | |
| parent | 042b83d4c502d17db40f1fa4f6d9b6cb86c653d2 (diff) | |
pci: Honour pci_skip_dev()
When enumerating devices, honour the pci_skip_dev() function. This can
be used by PCI controller drivers to restrict which devices will be
probed.
This is required by the NVIDIA Tegra PCIe controller driver, which will
fail with a data abort exception if an access is attempted to a device
number larger than 0 outside of bus 0. pci_skip_dev() is therefore
implemented to prevent any such accesses.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pci/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5d547901b81..7ee21d1c1d1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -195,6 +195,9 @@ pci_dev_t pci_find_devices(struct pci_device_id *ids, int index) bdf < PCI_BDF(bus + 1, 0, 0); #endif bdf += PCI_BDF(0, 0, 1)) { + if (pci_skip_dev(hose, bdf)) + continue; + if (!PCI_FUNC(bdf)) { pci_read_config_byte(bdf, PCI_HEADER_TYPE, |
