diff options
| author | Simon Glass <sjg@chromium.org> | 2020-04-26 09:12:56 -0600 | 
|---|---|---|
| committer | Bin Meng <bmeng.cn@gmail.com> | 2020-04-30 17:40:16 +0800 | 
| commit | f1f4438218d4d042fd36431dd5ff382c0a9f7a2c (patch) | |
| tree | bdfdeec5b284b8917b6d5f5c83a6a72b89c450c6 /drivers/pci/pci-uclass.c | |
| parent | 526aabec2496834450f9dab06e4f62bdc0696d33 (diff) | |
pci: Avoid auto-config when chain loading
When U-Boot is not the first-stage bootloader we don't want to
re-configure the PCI devices, since this has already been done. Add a
check to avoid this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci/pci-uclass.c')
| -rw-r--r-- | drivers/pci/pci-uclass.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index d2e10d6868a..7f46e901fb2 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -1009,7 +1009,7 @@ static int pci_uclass_post_probe(struct udevice *bus)  	if (ret)  		return ret; -	if (CONFIG_IS_ENABLED(PCI_PNP) && +	if (CONFIG_IS_ENABLED(PCI_PNP) && ll_boot_init() &&  	    (!hose->skip_auto_config_until_reloc ||  	     (gd->flags & GD_FLG_RELOC))) {  		ret = pci_auto_config_devices(bus); @@ -1031,7 +1031,7 @@ static int pci_uclass_post_probe(struct udevice *bus)  	 * Note we only call this 1) after U-Boot is relocated, and 2)  	 * root bus has finished probing.  	 */ -	if ((gd->flags & GD_FLG_RELOC) && (bus->seq == 0)) { +	if ((gd->flags & GD_FLG_RELOC) && bus->seq == 0 && ll_boot_init()) {  		ret = fsp_init_phase_pci();  		if (ret)  			return ret; | 
