summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-11-24 23:49:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-08 08:46:51 +0100
commit14910c1f4ff475031bb4114a399d742074340f04 (patch)
tree9085a3a723d2267a3f43fa5d802584f35446a6c6 /drivers
parent7e81c76e62410f707363215ce1695ce0c92dfa6a (diff)
downloadlinux-stable-14910c1f4ff475031bb4114a399d742074340f04.tar.gz
linux-stable-14910c1f4ff475031bb4114a399d742074340f04.tar.bz2
linux-stable-14910c1f4ff475031bb4114a399d742074340f04.zip
PCI: aardvark: Update comment about disabling link training
commit 1d1cd163d0de22a4041a6f1aeabcf78f80076539 upstream. According to PCI Express Base Specifications (rev 4.0, 6.6.1 "Conventional reset"), after fundamental reset a 100ms delay is needed prior to enabling link training. Update comment in code to reflect this requirement. Link: https://lore.kernel.org/r/20201202184659.3795-1-pali@kernel.org Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/host/pci-aardvark.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index 68ab3aef0e12..66c4b9282420 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -275,7 +275,14 @@ 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 (PCI Express Base Specification, REV.
+ * 4.0 PCI Express, February 19 2014, 6.6.1 Conventional Reset) 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);