summaryrefslogtreecommitdiffstats
path: root/drivers/pci/host
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2018-05-22 14:24:20 +0200
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-05-24 18:00:44 +0100
commit0353ff29b3881a8d9df65ce08a01e636868c1ef2 (patch)
treeb6a5511d3bf0144a31371d9f8f183e5ee4700d03 /drivers/pci/host
parentf7e1c6461e04afb8574cd91864f316cfcb8969f4 (diff)
downloadlinux-stable-0353ff29b3881a8d9df65ce08a01e636868c1ef2.tar.gz
linux-stable-0353ff29b3881a8d9df65ce08a01e636868c1ef2.tar.bz2
linux-stable-0353ff29b3881a8d9df65ce08a01e636868c1ef2.zip
PCI: rcar: Poll more often in rcar_pcie_wait_for_dl()
The data link active signal usually takes ~20 uSec to be asserted, poll the bit more often to avoid useless delays in this function. Use udelay() instead of usleep() for such a small delay as suggested by the timer documentation. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Phil Edworthy <phil.edworthy@renesas.com> Cc: Simon Horman <horms+renesas@verge.net.au> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: linux-renesas-soc@vger.kernel.org
Diffstat (limited to 'drivers/pci/host')
-rw-r--r--drivers/pci/host/pcie-rcar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 8d161563bce8..5b999fe04c65 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -546,13 +546,14 @@ static int rcar_pcie_wait_for_phyrdy(struct rcar_pcie *pcie)
static int rcar_pcie_wait_for_dl(struct rcar_pcie *pcie)
{
- unsigned int timeout = 10;
+ unsigned int timeout = 10000;
while (timeout--) {
if ((rcar_pci_read_reg(pcie, PCIETSTR) & DATA_LINK_ACTIVE))
return 0;
- msleep(5);
+ udelay(5);
+ cpu_relax();
}
return -ETIMEDOUT;