summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-dt-tegra20.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-05-02 15:47:12 -0600
committerStephen Warren <swarren@nvidia.com>2012-06-20 12:37:42 -0600
commita12c0efc7a3f433377add0fa1fd0ed4836cc595e (patch)
tree5dd8af8833d4dc4361a118da90324f86e26b407e /arch/arm/mach-tegra/board-dt-tegra20.c
parentc554dee35c3e6b0c19db5fb75193d4cd99736c6b (diff)
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.c20
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)