[PATCH v3 6/8] PCI: rcar: Add macro for PHY ready check delay

Hans Zhang posted 8 patches 1 month, 1 week ago
[PATCH v3 6/8] PCI: rcar: Add macro for PHY ready check delay
Posted by Hans Zhang 1 month, 1 week ago
Add RCAR_PCIE_PHYRDY_CHECK_MS macro for PHY ready check delay.

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

diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 7583699ef7b6..653f13d82934 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -11,6 +11,8 @@
 
 #include "pcie-rcar.h"
 
+#define RCAR_PCIE_PHYRDY_CHECK_MS	5
+
 void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val, unsigned int reg)
 {
 	writel(val, pcie->base + reg);
@@ -39,7 +41,7 @@ int rcar_pcie_wait_for_phyrdy(struct rcar_pcie *pcie)
 		if (rcar_pci_read_reg(pcie, PCIEPHYSR) & PHYRDY)
 			return 0;
 
-		msleep(5);
+		msleep(RCAR_PCIE_PHYRDY_CHECK_MS);
 	}
 
 	return -ETIMEDOUT;
-- 
2.25.1