All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: layerscape-ep: Add check of the PCIe controller enablement
@ 2021-05-13  6:54 Biwen Li
  0 siblings, 0 replies; only message in thread
From: Biwen Li @ 2021-05-13  6:54 UTC (permalink / raw)
  To: u-boot

From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Stop to initialize the PCIe controller if it's disabled by RCW.

Fixes: 118e58e26eba ("pci: layerscape: Split the EP and RC driver")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
 drivers/pci/pcie_layerscape_ep.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index c7231635e4..f2813aeef6 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -269,6 +269,10 @@ static int ls_pcie_ep_probe(struct udevice *dev)
 	pcie->idx = ((unsigned long)pcie->dbi - PCIE_SYS_BASE_ADDR) /
 		    PCIE_CCSR_SIZE;
 
+	/* This controller is disabled by RCW */
+	if (!is_serdes_configured(PCIE_SRDS_PRTCL(pcie->idx)))
+		return 0;
+
 	pcie->big_endian = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
 					   "big-endian");
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-13  6:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13  6:54 [PATCH] pci: layerscape-ep: Add check of the PCIe controller enablement Biwen Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.