diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-uclass.c | 11 | ||||
-rw-r--r-- | drivers/pci/pci_rom.c | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index e2882e3b63..d2e10d6868 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -536,6 +536,8 @@ int pci_auto_config_devices(struct udevice *bus) int ret; debug("%s: device %s\n", __func__, dev->name); + if (dev_read_bool(dev, "pci,no-autoconfig")) + continue; ret = dm_pciauto_config_device(dev); if (ret < 0) return ret; @@ -1211,7 +1213,14 @@ u32 dm_pci_read_bar32(const struct udevice *dev, int barnum) bar = PCI_BASE_ADDRESS_0 + barnum * 4; dm_pci_read_config32(dev, bar, &addr); - if (addr & PCI_BASE_ADDRESS_SPACE_IO) + + /* + * If we get an invalid address, return this so that comparisons with + * FDT_ADDR_T_NONE work correctly + */ + if (addr == 0xffffffff) + return addr; + else if (addr & PCI_BASE_ADDRESS_SPACE_IO) return addr & PCI_BASE_ADDRESS_IO_MASK; else return addr & PCI_BASE_ADDRESS_MEM_MASK; diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 90f224b045..6b17f18bc0 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -33,12 +33,10 @@ #include <vbe.h> #include <video.h> #include <video_fb.h> +#include <acpi/acpi_s3.h> #include <linux/screen_info.h> -#ifdef CONFIG_X86 -#include <acpi_s3.h> DECLARE_GLOBAL_DATA_PTR; -#endif __weak bool board_should_run_oprom(struct udevice *dev) { |