提交 3ae140ad 编写于 作者: J Jim Quinlan 提交者: Lorenzo Pieralisi

PCI: brcmstb: Wait for 100ms following PERST# deassert

Be prudent and give some time for power and clocks to become stable.  As
described in the PCIe CEM specification sections 2.2 and 2.2.1; as well as
PCIe r5.0, 6.6.1.

Link: https://lore.kernel.org/r/20221011184211.18128-3-jim2101024@gmail.comSigned-off-by: NJim Quinlan <jim2101024@gmail.com>
Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
上级 198acab1
...@@ -1037,8 +1037,15 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie) ...@@ -1037,8 +1037,15 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
pcie->perst_set(pcie, 0); pcie->perst_set(pcie, 0);
/* /*
* Give the RC/EP time to wake up, before trying to configure RC. * Wait for 100ms after PERST# deassertion; see PCIe CEM specification
* Intermittently check status for link-up, up to a total of 100ms. * sections 2.2, PCIe r5.0, 6.6.1.
*/
msleep(100);
/*
* Give the RC/EP even more time to wake up, before trying to
* configure RC. Intermittently check status for link-up, up to a
* total of 100ms.
*/ */
for (i = 0; i < 100 && !brcm_pcie_link_up(pcie); i += 5) for (i = 0; i < 100 && !brcm_pcie_link_up(pcie); i += 5)
msleep(5); msleep(5);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册