|
@@ -975,12 +975,15 @@ static int pci_uclass_pre_probe(struct udevice *bus)
|
|
|
hose->bus = bus;
|
|
|
hose->first_busno = bus->seq;
|
|
|
hose->last_busno = bus->seq;
|
|
|
+ hose->skip_auto_config_until_reloc =
|
|
|
+ dev_read_bool(bus, "u-boot,skip-auto-config-until-reloc");
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static int pci_uclass_post_probe(struct udevice *bus)
|
|
|
{
|
|
|
+ struct pci_controller *hose = dev_get_uclass_priv(bus);
|
|
|
int ret;
|
|
|
|
|
|
debug("%s: probing bus %d\n", __func__, bus->seq);
|
|
@@ -988,11 +991,13 @@ static int pci_uclass_post_probe(struct udevice *bus)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
-#if CONFIG_IS_ENABLED(PCI_PNP)
|
|
|
- ret = pci_auto_config_devices(bus);
|
|
|
- if (ret < 0)
|
|
|
- return ret;
|
|
|
-#endif
|
|
|
+ if (CONFIG_IS_ENABLED(PCI_PNP) &&
|
|
|
+ (!hose->skip_auto_config_until_reloc ||
|
|
|
+ (gd->flags & GD_FLG_RELOC))) {
|
|
|
+ ret = pci_auto_config_devices(bus);
|
|
|
+ if (ret < 0)
|
|
|
+ return log_msg_ret("pci auto-config", ret);
|
|
|
+ }
|
|
|
|
|
|
#if defined(CONFIG_X86) && defined(CONFIG_HAVE_FSP)
|
|
|
/*
|