]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_pci.c
spi: omap3_spi: add am43xx support to omap3_spi
[karo-tx-uboot.git] / common / cmd_pci.c
index 5a6048c9260476300d8ab79ca1ef6cb8efa7cfb6..dcecef8da859b467e08cf3cf0434658b758fb668 100644 (file)
@@ -48,6 +48,7 @@ void pciinfo(int BusNum, int ShortPCIListing)
        unsigned char HeaderType;
        unsigned short VendorID;
        pci_dev_t dev;
+       int ret;
 
        if (!hose)
                return;
@@ -71,7 +72,13 @@ void pciinfo(int BusNum, int ShortPCIListing)
 
                        dev = PCI_BDF(BusNum, Device, Function);
 
-                       pci_read_config_word(dev, PCI_VENDOR_ID, &VendorID);
+                       if (pci_skip_dev(hose, dev))
+                               continue;
+
+                       ret = pci_read_config_word(dev, PCI_VENDOR_ID,
+                                                  &VendorID);
+                       if (ret)
+                               goto error;
                        if ((VendorID == 0xFFFF) || (VendorID == 0x0000))
                                continue;
 
@@ -88,8 +95,12 @@ void pciinfo(int BusNum, int ShortPCIListing)
                                       BusNum, Device, Function);
                                pci_header_show(dev);
                        }
-           }
-    }
+               }
+       }
+
+       return;
+error:
+       printf("Cannot read bus configuration: %d\n", ret);
 }