Move tegra_pcie_power_off before tegra_pcie_power_on for clean addition
of PCIE power gating

Signed-off-by: Mike Rapoport <[email protected]>
---
 arch/arm/mach-tegra/pcie.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index 53f5fa3..6de5ef4 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -682,6 +682,15 @@ static void tegra_pcie_xclk_clamp(bool clamp)
        pmc_writel(reg, PMC_SCRATCH42);
 }
 
+static void tegra_pcie_power_off(void)
+{
+       tegra_periph_reset_assert(tegra_pcie.pcie_xclk);
+       tegra_periph_reset_assert(tegra_pcie.afi_clk);
+       tegra_periph_reset_assert(tegra_pcie.pex_clk);
+
+       tegra_pcie_xclk_clamp(true);
+}
+
 static int tegra_pcie_power_on(void)
 {
        tegra_pcie_xclk_clamp(true);
@@ -693,15 +702,6 @@ static int tegra_pcie_power_on(void)
        return clk_enable(tegra_pcie.pll_e);
 }
 
-static void tegra_pcie_power_off(void)
-{
-       tegra_periph_reset_assert(tegra_pcie.pcie_xclk);
-       tegra_periph_reset_assert(tegra_pcie.afi_clk);
-       tegra_periph_reset_assert(tegra_pcie.pex_clk);
-
-       tegra_pcie_xclk_clamp(true);
-}
-
 static int tegra_pcie_clocks_get(void)
 {
        int err;
-- 
1.7.3.1

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

Reply via email to