diff mbox

[2/5] PCI: dra7xx: Use dw_pcie_link_up() consistently

Message ID 20150604220151.4377.38040.stgit@bhelgaas-glaptop2.roam.corp.google.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Bjorn Helgaas June 4, 2015, 10:01 p.m. UTC
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>
---
 drivers/pci/host/pci-dra7xx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Kishon Vijay Abraham I June 7, 2015, 5:37 a.m. UTC | #1
On Friday 05 June 2015 03:31 AM, Bjorn Helgaas wrote:
> 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>
> ---
>   drivers/pci/host/pci-dra7xx.c |    3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
> index 2d57e19..e3d15d7 100644
> --- a/drivers/pci/host/pci-dra7xx.c
> +++ b/drivers/pci/host/pci-dra7xx.c
> @@ -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);
>   	}
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 2d57e19..e3d15d7 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -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);
 	}