Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235274
b: refs/heads/master
c: b96cc7f
h: refs/heads/master
v: v3
  • Loading branch information
Mike Rapoport authored and Colin Cross committed Mar 3, 2011
1 parent 4ebd7f4 commit 1151f9e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e40a97e6cb69d8b7edba801d75d1024078ce9aa
refs/heads/master: b96cc7fe190b9356633c70afae61ee0637b000ee
22 changes: 20 additions & 2 deletions trunk/arch/arm/mach-tegra/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <mach/pinmux.h>
#include <mach/iomap.h>
#include <mach/clk.h>
#include <mach/powergate.h>

/* register definitions */
#define AFI_OFFSET 0x3800
Expand Down Expand Up @@ -688,13 +689,30 @@ static void tegra_pcie_power_off(void)
tegra_periph_reset_assert(tegra_pcie.afi_clk);
tegra_periph_reset_assert(tegra_pcie.pex_clk);

tegra_powergate_power_off(TEGRA_POWERGATE_PCIE);
tegra_pcie_xclk_clamp(true);
}

static int tegra_pcie_power_on(void)
static int tegra_pcie_power_regate(void)
{
int err;

tegra_pcie_power_off();

tegra_pcie_xclk_clamp(true);

tegra_periph_reset_assert(tegra_pcie.pcie_xclk);
tegra_periph_reset_assert(tegra_pcie.afi_clk);

err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_PCIE,
tegra_pcie.pex_clk);
if (err) {
pr_err("PCIE: powerup sequence failed: %d\n", err);
return err;
}

tegra_periph_reset_deassert(tegra_pcie.afi_clk);

tegra_pcie_xclk_clamp(false);

clk_enable(tegra_pcie.afi_clk);
Expand Down Expand Up @@ -759,7 +777,7 @@ static int __init tegra_pcie_get_resources(void)
return err;
}

err = tegra_pcie_power_on();
err = tegra_pcie_power_regate();
if (err) {
pr_err("PCIE: failed to power up: %d\n", err);
goto err_pwr_on;
Expand Down

0 comments on commit 1151f9e

Please sign in to comment.