linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: aardvark: Update comment about disabling link training
@ 2020-09-24  8:46 Pali Rohár
  2020-09-24 15:11 ` Bjorn Helgaas
  2020-12-02 18:46 ` [PATCH v2] " Pali Rohár
  0 siblings, 2 replies; 9+ messages in thread
From: Pali Rohár @ 2020-09-24  8:46 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas; +Cc: linux-pci, linux-kernel

It is not HW bug or workaround for some cards but it is requirement by PCI
Express spec. After fundamental reset is needed 100ms delay prior enabling
link training. So update comment in code to reflect this requirement.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 drivers/pci/controller/pci-aardvark.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index 50ab6d7519ae..19b9b79226e5 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -259,7 +259,12 @@ static void advk_pcie_issue_perst(struct advk_pcie *pcie)
 	if (!pcie->reset_gpio)
 		return;
 
-	/* PERST does not work for some cards when link training is enabled */
+	/*
+	 * As required by PCI Express spec a delay for at least 100ms after
+	 * de-asserting PERST# signal is needed before link training is enabled.
+	 * So ensure that link training is disabled prior de-asserting PERST#
+	 * signal to fulfill that PCI Express spec requirement.
+	 */
 	reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
 	reg &= ~LINK_TRAINING_EN;
 	advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-07 16:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24  8:46 [PATCH] PCI: aardvark: Update comment about disabling link training Pali Rohár
2020-09-24 15:11 ` Bjorn Helgaas
2020-09-24 15:22   ` Pali Rohár
2020-10-11 17:21     ` Pali Rohár
2020-11-29 23:17       ` Pali Rohár
2020-11-30 10:52         ` Lorenzo Pieralisi
2020-12-02 18:41           ` Pali Rohár
2020-12-02 18:46 ` [PATCH v2] " Pali Rohár
2020-12-07 16:42   ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).