[PATCH v3 5/8] PCI: brcmstb: Add macro for link up check delay

Hans Zhang posted 8 patches 1 month, 1 week ago
[PATCH v3 5/8] PCI: brcmstb: Add macro for link up check delay
Posted by Hans Zhang 1 month, 1 week ago
Add BRCM_PCIE_LINK_UP_CHECK_MS macro for link up check delay.

Signed-off-by: Hans Zhang <18255117159@163.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 9afbd02ded35..dd682c5e5f49 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -214,6 +214,8 @@
 #define  PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_PWRDN_MASK		0x1
 #define  PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_PWRDN_SHIFT		0x0
 
+#define BRCM_PCIE_LINK_UP_CHECK_MS	5
+
 /* Forward declarations */
 struct brcm_pcie;
 
@@ -1365,7 +1367,7 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
 	 * total of 100ms.
 	 */
 	for (i = 0; i < 100 && !brcm_pcie_link_up(pcie); i += 5)
-		msleep(5);
+		msleep(BRCM_PCIE_LINK_UP_CHECK_MS);
 
 	if (!brcm_pcie_link_up(pcie)) {
 		dev_err(dev, "link down\n");
-- 
2.25.1