mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
65f62b1ca1
In pci_uclass_pre_probe an attempt is made to detect whether the parent of a device is a PCI device and that the device is thus a bridge. This was being done by checking whether the parent of the device is of the UCLASS_ROOT class. This causes problems if the PCI controller is a child of some other non-PCI node, for example a simple-bus node. For example, if the device tree contains something like the following then pci_uclass_pre_probe would incorrectly believe that the PCI controller is a bridge, with a PCI parent: / { some_child { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <>; pci_controller: pci@10000000 { compatible = "my-pci-controller"; device_type = "pci"; reg = <0x10000000 0x2000000>; }; }; }; Avoid this incorrect detection of bridges by instead checking whether the parent devices class is UCLASS_PCI and treating a device as a bridge when this is true, making use of device_is_on_pci_bus to perform this test. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
||
---|---|---|
.. | ||
fsl_pci_init.c | ||
Kconfig | ||
Makefile | ||
pci-emul-uclass.c | ||
pci-uclass.c | ||
pci.c | ||
pci_auto.c | ||
pci_auto_common.c | ||
pci_auto_old.c | ||
pci_common.c | ||
pci_compat.c | ||
pci_ftpci100.c | ||
pci_gt64120.c | ||
pci_indirect.c | ||
pci_internal.h | ||
pci_msc01.c | ||
pci_mvebu.c | ||
pci_rom.c | ||
pci_sandbox.c | ||
pci_sh4.c | ||
pci_sh7751.c | ||
pci_sh7780.c | ||
pci_tegra.c | ||
pci_x86.c | ||
pcie_imx.c | ||
pcie_layerscape.c | ||
pcie_xilinx.c | ||
tsi108_pci.c | ||
w83c553f.c |