aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-harmony-power.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-08-03 17:24:38 -0400
committerStephen Warren <swarren@nvidia.com>2012-09-14 13:31:36 -0400
commitbb25af8167d357e3ce3774e85e0b43dc2e931289 (patch)
tree57c5af56a0df3ca9514236886ad8835137e15b30 /arch/arm/mach-tegra/board-harmony-power.c
parentcff1dfbfcd62b2c98c6a79573e5a5c39b0bcd43c (diff)
ARM: tegra: remove board (but not DT) support for Harmony
Harmony can be booted using device tree with equal functionality as when booted using a board file. Remove as much of the board file as is possible, since it's no longer needed. Two special-cases are still left in board-dt-tegra20.c, since the Tegra PCIe driver doesn't support device tree yet, and the Harmony .dts file doesn't yet describe regulators which are needed for PCIe. This logic is now enabled unconditionally rather than via CONFIG_MACH_HARMONY. While this is more code than other boards, it's still unlikely to be much of a problem, and both regulators and PCIe should be supported via device tree in the near future, allowing the remaining code to be removed. Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-power.c')
-rw-r--r--arch/arm/mach-tegra/board-harmony-power.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c
index 94486e7e9dfd..fddfb8213d2c 100644
--- a/arch/arm/mach-tegra/board-harmony-power.c
+++ b/arch/arm/mach-tegra/board-harmony-power.c
@@ -128,29 +128,25 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
128 128
129int __init harmony_regulator_init(void) 129int __init harmony_regulator_init(void)
130{ 130{
131 struct device_node *np;
132 struct i2c_adapter *adapter;
133
131 regulator_register_always_on(0, "vdd_5v0", 134 regulator_register_always_on(0, "vdd_5v0",
132 NULL, 0, 5000000); 135 NULL, 0, 5000000);
133 136
134 if (machine_is_harmony()) { 137 np = of_find_node_by_path("/i2c@7000d000");
135 i2c_register_board_info(3, harmony_regulators, 1); 138 if (np == NULL) {
136 } else { /* Harmony, booted using device tree */ 139 pr_err("Could not find device_node for DVC I2C\n");
137 struct device_node *np; 140 return -ENODEV;
138 struct i2c_adapter *adapter; 141 }
139 142
140 np = of_find_node_by_path("/i2c@7000d000"); 143 adapter = of_find_i2c_adapter_by_node(np);
141 if (np == NULL) { 144 if (!adapter) {
142 pr_err("Could not find device_node for DVC I2C\n"); 145 pr_err("Could not find i2c_adapter for DVC I2C\n");
143 return -ENODEV; 146 return -ENODEV;
144 }
145
146 adapter = of_find_i2c_adapter_by_node(np);
147 if (!adapter) {
148 pr_err("Could not find i2c_adapter for DVC I2C\n");
149 return -ENODEV;
150 }
151
152 i2c_new_device(adapter, harmony_regulators);
153 } 147 }
154 148
149 i2c_new_device(adapter, harmony_regulators);
150
155 return 0; 151 return 0;
156} 152}