u-boot/drivers/pci
Paul Burton 65f62b1ca1 pci: Flip condition for detecting non-PCI parent devices
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>
2016-09-21 15:04:32 +02:00
..
fsl_pci_init.c fsl/pci: Set CFG_READY for PCIe v3.0 and later 2015-05-04 09:24:23 -07:00
Kconfig pci: xilinx: Add a driver for Xilinx AXI to PCIe bridge 2016-09-21 15:04:32 +02:00
Makefile pci: xilinx: Add a driver for Xilinx AXI to PCIe bridge 2016-09-21 15:04:32 +02:00
pci-emul-uclass.c dm: sandbox: pci: Add a PCI emulation uclass 2015-04-16 19:27:43 -06:00
pci-uclass.c pci: Flip condition for detecting non-PCI parent devices 2016-09-21 15:04:32 +02:00
pci.c pci: allow disabling of pci init/enum via env 2016-07-28 13:27:17 +02:00
pci_auto.c pci: Fix compiler warnings in dm_pciauto_setup_device() 2016-02-26 08:53:10 -07:00
pci_auto_common.c dm: pci: Break out the common region display code 2016-03-14 15:34:50 -06:00
pci_auto_old.c drivers/pci: Fix for debug builds without CONFIG_PCI_ENUM_ONLY 2016-01-14 14:08:59 +01:00
pci_common.c dm: pci: Switch to DM API for PCI address mapping 2016-01-12 10:19:09 -07:00
pci_compat.c dm: pci: Move pci_bus_to_hose() to compatibility 2016-01-24 12:07:17 +08: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_internal.h dm: pci: Move pci_bus_to_hose() to compatibility 2016-01-24 12:07:17 +08:00
pci_msc01.c malta: support for coreFPGA6 boards 2013-11-09 17:21:01 +01:00
pci_mvebu.c drivers/pci/pci_mvebu: Fix for boards with X4 lanes 2016-01-14 14:08:59 +01:00
pci_rom.c pci: Add board_ prefix to should_load_oprom() and make it weak 2016-07-12 13:46:01 +08:00
pci_sandbox.c dm: Use dm_scan_fdt_dev() directly where possible 2016-07-27 14:15:54 -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: port to standard clock/reset/pwr domain APIs 2016-08-15 10:26:13 -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 pcie_imx: increment timeout for link up 2016-07-12 17:58:48 +02:00
pcie_layerscape.c pcie/layerscape: fix bug in bus number computation when setting msi-map 2016-06-03 14:12:10 -07:00
pcie_xilinx.c pci: xilinx: Add a driver for Xilinx AXI to PCIe bridge 2016-09-21 15:04:32 +02: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