u-boot/drivers/pci
Bin Meng d11d9ef157 dm: pci: Support bridge device configuration correctly
Commit aec241d "dm: pci: Use the correct hose when configuring devices"
was an attempt to fix pci bridge device configuration, but unfortunately
that does not work 100%. In pciauto_config_devices(), the fix tried to
call pciauto_config_device() with a ctlr_hose which is supposed to be
the root controller hose, however when walking through a pci topology
with 2 or more pci bridges this logic simply fails.

The call chain is: pciauto_config_devices()->pciauto_config_device()
->dm_pci_hose_probe_bus(). Here the call to dm_pci_hose_probe_bus()
does not make any sense as the given hose is not the bridge device's
hose, instead it is either the root controller's hose (case#1: if it
is the 2nd pci bridge), or the bridge's parent bridge's hose (case#2:
if it is the 3rd pci bridge). In both cases the logic is wrong.

For example, for failing case#1 if the bridge device to config has the
same devfn as one of the devices under the root controller, the call
to pci_bus_find_devfn() will return the udevice of that pci device
under the root controller as the bus, but this is wrong as the udevice
is not a bus which does not contain all the necessary bits associated
with the udevice which causes further failures.

To correctly support pci bridge device configuration, we should still
call pciauto_config_device() with the pci bridge's hose directly.
In order to access valid pci region information, we need to refer to
the root controller simply by a call to pci_bus_to_hose(0) and get the
region information there in the pciauto_prescan_setup_bridge(),
pciauto_postscan_setup_bridge() and pciauto_config_device().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-07-28 10:36:24 -06:00
..
Kconfig dm: sandbox: Add a simple PCI driver 2015-04-16 19:27:43 -06:00
Makefile dm: x86: pci: Add a PCI driver for driver model 2015-04-18 11:11:09 -06:00
fsl_pci_init.c fsl/pci: Set CFG_READY for PCIe v3.0 and later 2015-05-04 09:24:23 -07:00
pci-emul-uclass.c dm: sandbox: pci: Add a PCI emulation uclass 2015-04-16 19:27:43 -06:00
pci-uclass.c dm: pci: Support bridge device configuration correctly 2015-07-28 10:36:24 -06:00
pci.c pci: Move pci_hose_phys_to_bus() to pci_common.c 2015-06-04 02:39:38 -06:00
pci_auto.c dm: pci: Support bridge device configuration correctly 2015-07-28 10:36:24 -06:00
pci_common.c dm: pci: Support bridge device configuration correctly 2015-07-28 10:36:24 -06:00
pci_compat.c dm: pci: Add a function to get the BDF for a device 2015-07-21 17:39:39 -06:00
pci_ftpci100.c Merge branch 'master' of git://git.denx.de/u-boot-nds32 2013-07-25 08:51:51 -04:00
pci_gt64120.c qemu-malta: Update for SPDX license identifiers 2013-07-25 08:51:48 -04:00
pci_indirect.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pci_msc01.c malta: support for coreFPGA6 boards 2013-11-09 17:21:01 +01:00
pci_rom.c pci: Disable expansion ROM address decoding when signature check fails 2015-07-14 18:03:20 -06:00
pci_sandbox.c dm: sandbox: Add a simple PCI driver 2015-04-16 19:27:43 -06:00
pci_sh4.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pci_sh7751.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pci_sh7780.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pci_tegra.c pci: tegra: Fix port information parsing 2015-01-23 17:25:30 -07:00
pci_x86.c x86: pci: Tidy up the generic x86 PCI driver 2015-07-14 18:03:19 -06:00
pcie_imx.c pci: imx: display message if no pcie link 2015-05-28 12:01:44 +02:00
pcie_layerscape.c armv8/fsl-lsch3: device tree fixups for PCI stream IDs 2015-07-20 11:44:37 -07:00
tsi108_pci.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
w83c553f.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00