pci: layerscape: Do not scan when PEX work in EP mode
authorXiaowei Bao <xiaowei.bao@nxp.com>
Fri, 26 Oct 2018 01:56:25 +0000 (09:56 +0800)
committerYork Sun <york.sun@nxp.com>
Thu, 17 Jan 2019 21:17:33 +0000 (13:17 -0800)
Don't scan the bus when the PEX work in EP mode.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/pci/pcie_layerscape.c

index 17cba46ebeb77d069018a8cdb6b16e58b2f8b111..db1375a1cea06c8964830a63e0f06abd3ac2a8e9 100644 (file)
@@ -225,6 +225,9 @@ static int ls_pcie_addr_valid(struct ls_pcie *pcie, pci_dev_t bdf)
 {
        struct udevice *bus = pcie->bus;
 
+       if (pcie->mode == PCI_HEADER_TYPE_NORMAL)
+               return -ENODEV;
+
        if (!pcie->enabled)
                return -ENXIO;