summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2011-03-02 14:34:04 +0200
committerColin Cross <ccross@android.com>2011-03-03 13:56:08 -0800
commit1e40a97e6cb69d8b7edba801d75d1024078ce9aa (patch)
tree822df1e0ca5178edd0bbf52e647f4cc78282ca7d /arch
parentccac05152e7c6a8103b9e7a801bc995180a800fc (diff)
downloadlinux-1e40a97e6cb69d8b7edba801d75d1024078ce9aa.tar.bz2
ARM: tegra: PCIE minor code refactoring
Move tegra_pcie_power_off before tegra_pcie_power_on for clean addition of PCIE power gating Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/pcie.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index 53f5fa37014a..6de5ef47c027 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;