diff options
-rw-r--r-- | arch/arm/mach-tegra/pcie.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index d929922f1c51..344ace587553 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -1099,13 +1099,6 @@ static bool tegra_pcie_check_link(struct tegra_pcie_port *pp, int idx, int timeout; do { - /* Pulse the PEX reset */ - reg = afi_readl(reset_reg) & ~AFI_PEX_CTRL_RST; - afi_writel(reg, reset_reg); - mdelay(1); - reg = afi_readl(reset_reg) | AFI_PEX_CTRL_RST; - afi_writel(reg, reset_reg); - timeout = TEGRA_PCIE_LINKUP_TIMEOUT; while (timeout) { reg = readl(pp->base + RP_VEND_XP); @@ -1134,6 +1127,12 @@ static bool tegra_pcie_check_link(struct tegra_pcie_port *pp, int idx, } retry: + /* Pulse the PEX reset */ + reg = afi_readl(reset_reg) & ~AFI_PEX_CTRL_RST; + afi_writel(reg, reset_reg); + reg = afi_readl(reset_reg) | AFI_PEX_CTRL_RST; + afi_writel(reg, reset_reg); + retries--; } while (retries); |