diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-05-03 01:47:12 +0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-06-20 22:37:42 +0400 |
commit | a12c0efc7a3f433377add0fa1fd0ed4836cc595e (patch) | |
tree | 5dd8af8833d4dc4361a118da90324f86e26b407e /arch/arm/mach-tegra/board-dt-tegra20.c | |
parent | c554dee35c3e6b0c19db5fb75193d4cd99736c6b (diff) | |
download | linux-a12c0efc7a3f433377add0fa1fd0ed4836cc595e.tar.xz |
ARM: tegra: harmony: init regulators, PCIe when booting from DT
There currently aren't bindings for the Tegra PCIe controller. Work on
this is in progress, but not yet complete. Manually initialize PCIe when
booting from device tree, in order to bring DT support to the same
feature level as board files, which will in turn allow board files to be
deprecated.
PCIe on Harmony requires various regulators to be registered and enabled
before initializing the PCIe controller. Note that since the I2C
controllers are instantiated from DT, we must use i2c_new_device() to
register the PMU rather than i2c_register_board_info().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-dt-tegra20.c')
-rw-r--r-- | arch/arm/mach-tegra/board-dt-tegra20.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 9537f20384fc..777138611c77 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c @@ -109,6 +109,23 @@ static void __init trimslice_init(void) } #endif +#ifdef CONFIG_MACH_HARMONY +static void __init harmony_init(void) +{ + int ret; + + ret = harmony_regulator_init(); + if (ret) { + pr_err("harmony_regulator_init() failed: %d\n", ret); + return; + } + + ret = harmony_pcie_init(); + if (ret) + pr_err("harmony_pcie_init() failed: %d\n", ret); +} +#endif + static struct { char *machine; void (*init)(void); @@ -116,6 +133,9 @@ static struct { #ifdef CONFIG_MACH_TRIMSLICE { "compulab,trimslice", trimslice_init }, #endif +#ifdef CONFIG_MACH_HARMONY + { "nvidia,harmony", harmony_init }, +#endif }; static void __init tegra_dt_init_late(void) |