diff options
author | Mike Rapoport <mike@compulab.co.il> | 2011-03-02 07:34:04 -0500 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-03-03 16:56:08 -0500 |
commit | 1e40a97e6cb69d8b7edba801d75d1024078ce9aa (patch) | |
tree | 822df1e0ca5178edd0bbf52e647f4cc78282ca7d | |
parent | ccac05152e7c6a8103b9e7a801bc995180a800fc (diff) |
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>
-rw-r--r-- | 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 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) | |||
682 | pmc_writel(reg, PMC_SCRATCH42); | 682 | pmc_writel(reg, PMC_SCRATCH42); |
683 | } | 683 | } |
684 | 684 | ||
685 | static void tegra_pcie_power_off(void) | ||
686 | { | ||
687 | tegra_periph_reset_assert(tegra_pcie.pcie_xclk); | ||
688 | tegra_periph_reset_assert(tegra_pcie.afi_clk); | ||
689 | tegra_periph_reset_assert(tegra_pcie.pex_clk); | ||
690 | |||
691 | tegra_pcie_xclk_clamp(true); | ||
692 | } | ||
693 | |||
685 | static int tegra_pcie_power_on(void) | 694 | static int tegra_pcie_power_on(void) |
686 | { | 695 | { |
687 | tegra_pcie_xclk_clamp(true); | 696 | tegra_pcie_xclk_clamp(true); |
@@ -693,15 +702,6 @@ static int tegra_pcie_power_on(void) | |||
693 | return clk_enable(tegra_pcie.pll_e); | 702 | return clk_enable(tegra_pcie.pll_e); |
694 | } | 703 | } |
695 | 704 | ||
696 | static void tegra_pcie_power_off(void) | ||
697 | { | ||
698 | tegra_periph_reset_assert(tegra_pcie.pcie_xclk); | ||
699 | tegra_periph_reset_assert(tegra_pcie.afi_clk); | ||
700 | tegra_periph_reset_assert(tegra_pcie.pex_clk); | ||
701 | |||
702 | tegra_pcie_xclk_clamp(true); | ||
703 | } | ||
704 | |||
705 | static int tegra_pcie_clocks_get(void) | 705 | static int tegra_pcie_clocks_get(void) |
706 | { | 706 | { |
707 | int err; | 707 | int err; |