summaryrefslogtreecommitdiffstats
path: root/drivers/pci
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 19:00:44 +0200
commit0353ff29b3881a8d9df65ce08a01e636868c1ef2 (patch)
treeb6a5511d3bf0144a31371d9f8f183e5ee4700d03 /drivers/pci
parentPCI: rcar: Reuse generic pci_parse_request_of_pci_ranges() function (diff)
downloadlinux-0353ff29b3881a8d9df65ce08a01e636868c1ef2.tar.xz
linux-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')
-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;