From 87e0d2b9ac6e82dd2cb5164f029396a44fbbbe82 Mon Sep 17 00:00:00 2001 From: Xiaowei Bao Date: Fri, 26 Oct 2018 09:56:25 +0800 Subject: [PATCH] pci: layerscape: Do not scan when PEX work in EP mode Don't scan the bus when the PEX work in EP mode. Signed-off-by: Xiaowei Bao Reviewed-by: York Sun --- drivers/pci/pcie_layerscape.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c index 17cba46ebe..db1375a1ce 100644 --- a/drivers/pci/pcie_layerscape.c +++ b/drivers/pci/pcie_layerscape.c @@ -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; -- 2.39.5