PCI: dra7xx: Use dw_pcie_link_up() consistently
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 2 Jun 2015 21:21:11 +0000 (16:21 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 10 Jun 2015 18:52:28 +0000 (13:52 -0500)
We already use dw_pcie_link_up() once in dra7xx_pcie_establish_link(), but
we duplicate its code later.  Use dw_pcie_link_up() for consistency.  No
functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Pratyush Anand <pratyush.anand@gmail.com>
drivers/pci/host/pci-dra7xx.c

index 2d57e19a2cd43b02617eaff96046a4b75e36ad4f..e3d15d7875c27aeefda40ded8a49776ee852b04c 100644 (file)
@@ -107,8 +107,7 @@ static int dra7xx_pcie_establish_link(struct pcie_port *pp)
        dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD, reg);
 
        while (retries--) {
-               reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_PHY_CS);
-               if (reg & LINK_UP)
+               if (dw_pcie_link_up(pp))
                        break;
                usleep_range(10, 20);
        }