summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-dra7xx.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-03-15 16:55:52 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-03-15 16:55:52 +0300
commit562df5c8521e1371f3cbd0b7b868034da376d714 (patch)
tree798a5b2f688a60307889c632a20e32aae65d51fa /drivers/pci/host/pci-dra7xx.c
parentc334f9c89e40d2c9f4598e87e186bf3264d39e51 (diff)
parent5a3aa2a8fae4ce1a3ad786d212b8fffca8ee72f5 (diff)
downloadlinux-562df5c8521e1371f3cbd0b7b868034da376d714.tar.xz
Merge branch 'pci/host-designware' into next
* pci/host-designware: PCI: designware: Add driver for prototyping kits based on ARC SDP PCI: designware: Add default link up check if sub-driver doesn't override PCI: designware: Add generic dw_pcie_wait_for_link() ARC: Add PCI support
Diffstat (limited to 'drivers/pci/host/pci-dra7xx.c')
-rw-r--r--drivers/pci/host/pci-dra7xx.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 923607bdabc5..2ca3a1f30ebf 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -10,7 +10,6 @@
* published by the Free Software Foundation.
*/
-#include <linux/delay.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
@@ -108,7 +107,6 @@ static int dra7xx_pcie_establish_link(struct pcie_port *pp)
{
struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pp);
u32 reg;
- unsigned int retries;
if (dw_pcie_link_up(pp)) {
dev_err(pp->dev, "link is already up\n");
@@ -119,14 +117,7 @@ static int dra7xx_pcie_establish_link(struct pcie_port *pp)
reg |= LTSSM_EN;
dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD, reg);
- for (retries = 0; retries < 1000; retries++) {
- if (dw_pcie_link_up(pp))
- return 0;
- usleep_range(10, 20);
- }
-
- dev_err(pp->dev, "link is not up\n");
- return -EINVAL;
+ return dw_pcie_wait_for_link(pp);
}
static void dra7xx_pcie_enable_interrupts(struct pcie_port *pp)