-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mike Rapoport <mike@compulab.co.il> CC: Olof Johansson <olof@lixom.net> CC: Gary King <GKing@nvidia.com> Signed-off-by: Colin Cross <ccross@android.com>
- Loading branch information
Mike Rapoport
authored and
Colin Cross
committed
Oct 22, 2010
1 parent
77ffc14
commit f2a4439
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* arch/arm/mach-tegra/board-harmony-pcie.c | ||
* | ||
* Copyright (C) 2010 CompuLab, Ltd. | ||
* Mike Rapoport <mike@compulab.co.il> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/gpio.h> | ||
#include <linux/err.h> | ||
#include <linux/regulator/consumer.h> | ||
|
||
#include <asm/mach-types.h> | ||
|
||
#include <mach/pinmux.h> | ||
#include "board.h" | ||
|
||
#ifdef CONFIG_TEGRA_PCI | ||
|
||
static int __init harmony_pcie_init(void) | ||
{ | ||
int err; | ||
|
||
if (!machine_is_harmony()) | ||
return 0; | ||
|
||
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); | ||
|
||
err = tegra_pcie_init(true, true); | ||
if (err) | ||
goto err_pcie; | ||
|
||
return 0; | ||
|
||
err_pcie: | ||
tegra_pinmux_set_tristate(TEGRA_PINGROUP_GPV, TEGRA_TRI_TRISTATE); | ||
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXA, TEGRA_TRI_TRISTATE); | ||
tegra_pinmux_set_tristate(TEGRA_PINGROUP_SLXK, TEGRA_TRI_TRISTATE); | ||
|
||
return err; | ||
} | ||
|
||
subsys_initcall(harmony_pcie_init); | ||
|
||
#endif |