Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241741
b: refs/heads/master
c: ce005cf
h: refs/heads/master
i:
  241739: 9d2f20a
v: v3
  • Loading branch information
Mike Rapoport authored and Olof Johansson committed Mar 15, 2011
1 parent d582894 commit c66a993
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 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: c4d9e4a0b9960fbf4d945bdad47ba005abe8813c
refs/heads/master: ce005cf450b2c1c93e48c45a4cc717e9d104c054
24 changes: 23 additions & 1 deletion trunk/arch/arm/mach-tegra/board-harmony-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,29 @@

#ifdef CONFIG_TEGRA_PCI

/* GPIO 3 of the PMIC */
#define EN_VDD_1V05_GPIO (TEGRA_NR_GPIOS + 2)

static int __init harmony_pcie_init(void)
{
struct regulator *regulator = NULL;
int err;

if (!machine_is_harmony())
return 0;

err = gpio_request(EN_VDD_1V05_GPIO, "EN_VDD_1V05");
if (err)
return err;

gpio_direction_output(EN_VDD_1V05_GPIO, 1);

regulator = regulator_get(NULL, "pex_clk");
if (IS_ERR_OR_NULL(regulator))
goto err_reg;

regulator_enable(regulator);

tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_NORMAL);
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_NORMAL);
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_NORMAL);
Expand All @@ -49,9 +65,15 @@ static int __init harmony_pcie_init(void)
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_TRISTATE);
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_TRISTATE);

regulator_disable(regulator);
regulator_put(regulator);
err_reg:
gpio_free(EN_VDD_1V05_GPIO);

return err;
}

subsys_initcall(harmony_pcie_init);
/* PCI should be initialized after I2C, mfd and regulators */
subsys_initcall_sync(harmony_pcie_init);

#endif

0 comments on commit c66a993

Please sign in to comment.