diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-15 14:55:52 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-15 14:55:52 +0100 |
commit | 562df5c8521e1371f3cbd0b7b868034da376d714 (patch) | |
tree | 798a5b2f688a60307889c632a20e32aae65d51fa /drivers/pci/host/pcie-spear13xx.c | |
parent | Merge branches 'pci/host-altera', 'pci/host-imx6', 'pci/host-keystone', 'pci/... (diff) | |
parent | PCI: designware: Add driver for prototyping kits based on ARC SDP (diff) | |
download | linux-562df5c8521e1371f3cbd0b7b868034da376d714.tar.xz linux-562df5c8521e1371f3cbd0b7b868034da376d714.zip |
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/pcie-spear13xx.c')
-rw-r--r-- | drivers/pci/host/pcie-spear13xx.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c index a6cd8233e8c0..a4060b85ab23 100644 --- a/drivers/pci/host/pcie-spear13xx.c +++ b/drivers/pci/host/pcie-spear13xx.c @@ -13,7 +13,6 @@ */ #include <linux/clk.h> -#include <linux/delay.h> #include <linux/interrupt.h> #include <linux/kernel.h> #include <linux/module.h> @@ -149,7 +148,6 @@ static int spear13xx_pcie_establish_link(struct pcie_port *pp) struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pp); struct pcie_app_reg *app_reg = spear13xx_pcie->app_base; u32 exp_cap_off = EXP_CAP_ID_OFFSET; - unsigned int retries; if (dw_pcie_link_up(pp)) { dev_err(pp->dev, "link already up\n"); @@ -200,17 +198,7 @@ static int spear13xx_pcie_establish_link(struct pcie_port *pp) | ((u32)1 << REG_TRANSLATION_ENABLE), &app_reg->app_ctrl_0); - /* check if the link is up or not */ - for (retries = 0; retries < 10; retries++) { - if (dw_pcie_link_up(pp)) { - dev_info(pp->dev, "link up\n"); - return 0; - } - mdelay(100); - } - - dev_err(pp->dev, "link Fail\n"); - return -EINVAL; + return dw_pcie_wait_for_link(pp); } static irqreturn_t spear13xx_pcie_irq_handler(int irq, void *arg) |