Skip to content

Commit

Permalink
ARM: tegra: PCIE minor code refactoring
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Rapoport authored and Colin Cross committed Mar 3, 2011
1 parent ccac051 commit 1e40a97
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arch/arm/mach-tegra/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 1e40a97

Please sign in to comment.