diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2018-05-22 14:24:20 +0200 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2018-05-24 19:00:44 +0200 |
commit | 0353ff29b3881a8d9df65ce08a01e636868c1ef2 (patch) | |
tree | b6a5511d3bf0144a31371d9f8f183e5ee4700d03 /drivers/pci | |
parent | PCI: rcar: Reuse generic pci_parse_request_of_pci_ranges() function (diff) | |
download | linux-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.c | 5 |
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; |