Skip to content

Commit e7f2e2c

Browse files
paligregkh
authored andcommitted
PCI: aardvark: Update comment about disabling link training
commit 1d1cd16 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>
1 parent 2b7bc1c commit e7f2e2c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎drivers/pci/controller/pci-aardvark.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,14 @@ static void advk_pcie_issue_perst(struct advk_pcie *pcie)
389389
if (!pcie->reset_gpio)
390390
return;
391391

392-
/* PERST does not work for some cards when link training is enabled */
392+
/*
393+
* As required by PCI Express spec (PCI Express Base Specification, REV.
394+
* 4.0 PCI Express, February 19 2014, 6.6.1 Conventional Reset) a delay
395+
* for at least 100ms after de-asserting PERST# signal is needed before
396+
* link training is enabled. So ensure that link training is disabled
397+
* prior de-asserting PERST# signal to fulfill that PCI Express spec
398+
* requirement.
399+
*/
393400
reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
394401
reg &= ~LINK_TRAINING_EN;
395402
advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);

0 commit comments

Comments
 (0)