aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-dt-tegra20.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-05-02 17:47:12 -0400
committerStephen Warren <swarren@nvidia.com>2012-06-20 14:37:42 -0400
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)
109} 109}
110#endif 110#endif
111 111
112#ifdef CONFIG_MACH_HARMONY
113static void __init harmony_init(void)
114{
115 int ret;
116
117 ret = harmony_regulator_init();
118 if (ret) {
119 pr_err("harmony_regulator_init() failed: %d\n", ret);
120 return;
121 }
122
123 ret = harmony_pcie_init();
124 if (ret)
125 pr_err("harmony_pcie_init() failed: %d\n", ret);
126}
127#endif
128
112static struct { 129static struct {
113 char *machine; 130 char *machine;
114 void (*init)(void); 131 void (*init)(void);
@@ -116,6 +133,9 @@ static struct {
116#ifdef CONFIG_MACH_TRIMSLICE 133#ifdef CONFIG_MACH_TRIMSLICE
117 { "compulab,trimslice", trimslice_init }, 134 { "compulab,trimslice", trimslice_init },
118#endif 135#endif
136#ifdef CONFIG_MACH_HARMONY
137 { "nvidia,harmony", harmony_init },
138#endif
119}; 139};
120 140
121static void __init tegra_dt_init_late(void) 141static void __init tegra_dt_init_late(void)