summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-harmony-power.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-08-04 01:24:38 +0400
committerStephen Warren <swarren@nvidia.com>2012-09-14 21:31:36 +0400
commitbb25af8167d357e3ce3774e85e0b43dc2e931289 (patch)
tree57c5af56a0df3ca9514236886ad8835137e15b30 /arch/arm/mach-tegra/board-harmony-power.c
parentcff1dfbfcd62b2c98c6a79573e5a5c39b0bcd43c (diff)
downloadlinux-bb25af8167d357e3ce3774e85e0b43dc2e931289.tar.xz
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[] = {
int __init harmony_regulator_init(void)
{
+ struct device_node *np;
+ struct i2c_adapter *adapter;
+
regulator_register_always_on(0, "vdd_5v0",
NULL, 0, 5000000);
- if (machine_is_harmony()) {
- i2c_register_board_info(3, harmony_regulators, 1);
- } else { /* Harmony, booted using device tree */
- struct device_node *np;
- struct i2c_adapter *adapter;
-
- np = of_find_node_by_path("/i2c@7000d000");
- if (np == NULL) {
- pr_err("Could not find device_node for DVC I2C\n");
- return -ENODEV;
- }
-
- adapter = of_find_i2c_adapter_by_node(np);
- if (!adapter) {
- pr_err("Could not find i2c_adapter for DVC I2C\n");
- return -ENODEV;
- }
-
- i2c_new_device(adapter, harmony_regulators);
+ np = of_find_node_by_path("/i2c@7000d000");
+ if (np == NULL) {
+ pr_err("Could not find device_node for DVC I2C\n");
+ return -ENODEV;
+ }
+
+ adapter = of_find_i2c_adapter_by_node(np);
+ if (!adapter) {
+ pr_err("Could not find i2c_adapter for DVC I2C\n");
+ return -ENODEV;
}
+ i2c_new_device(adapter, harmony_regulators);
+
return 0;
}