diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 2 | ||||
-rw-r--r-- | common/cmd_pci.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c index 0335f6bde6c..af01e1cb998 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -230,7 +230,9 @@ static int initr_unlock_ram_in_cache(void) #ifdef CONFIG_PCI static int initr_pci(void) { +#ifndef CONFIG_DM_PCI pci_init(); +#endif return 0; } diff --git a/common/cmd_pci.c b/common/cmd_pci.c index e3a77e35820..dcecef8da85 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -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; @@ -74,7 +75,10 @@ void pciinfo(int BusNum, int ShortPCIListing) if (pci_skip_dev(hose, dev)) continue; - pci_read_config_word(dev, PCI_VENDOR_ID, &VendorID); + ret = pci_read_config_word(dev, PCI_VENDOR_ID, + &VendorID); + if (ret) + goto error; if ((VendorID == 0xFFFF) || (VendorID == 0x0000)) continue; @@ -91,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); } |