aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/arm/mach-tegra/Kconfig6
-rw-r--r--arch/arm/mach-tegra/Makefile6
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c6
-rw-r--r--arch/arm/mach-tegra/board-harmony-pinmux.c156
-rw-r--r--arch/arm/mach-tegra/board-harmony-power.c34
-rw-r--r--arch/arm/mach-tegra/board-harmony.c197
-rw-r--r--arch/arm/mach-tegra/board-harmony.h13
7 files changed, 19 insertions, 399 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index f6e79ed0745e..d3e73eca630b 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -60,12 +60,6 @@ config TEGRA_AHB
60 60
61comment "Tegra board type" 61comment "Tegra board type"
62 62
63config MACH_HARMONY
64 bool "Harmony board"
65 depends on ARCH_TEGRA_2x_SOC
66 help
67 Support for nVidia Harmony development platform
68
69choice 63choice
70 prompt "Default low-level debug console UART" 64 prompt "Default low-level debug console UART"
71 default TEGRA_DEBUG_UART_NONE 65 default TEGRA_DEBUG_UART_NONE
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index 1c2b47341d32..6273853f9557 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -26,9 +26,7 @@ obj-$(CONFIG_USB_SUPPORT) += usb_phy.o
26obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o 26obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o
27obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o 27obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o
28 28
29obj-$(CONFIG_MACH_HARMONY) += board-harmony.o 29obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-harmony-pcie.o
30obj-$(CONFIG_MACH_HARMONY) += board-harmony-pinmux.o 30obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-harmony-power.o
31obj-$(CONFIG_MACH_HARMONY) += board-harmony-pcie.o
32obj-$(CONFIG_MACH_HARMONY) += board-harmony-power.o
33 31
34obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-paz00.o 32obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-paz00.o
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 20721b487d2c..f336cdbc8971 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -106,7 +106,6 @@ static void __init trimslice_init(void)
106#endif 106#endif
107} 107}
108 108
109#ifdef CONFIG_MACH_HARMONY
110static void __init harmony_init(void) 109static void __init harmony_init(void)
111{ 110{
112 int ret; 111 int ret;
@@ -117,11 +116,12 @@ static void __init harmony_init(void)
117 return; 116 return;
118 } 117 }
119 118
119#ifdef CONFIG_TEGRA_PCI
120 ret = harmony_pcie_init(); 120 ret = harmony_pcie_init();
121 if (ret) 121 if (ret)
122 pr_err("harmony_pcie_init() failed: %d\n", ret); 122 pr_err("harmony_pcie_init() failed: %d\n", ret);
123}
124#endif 123#endif
124}
125 125
126static void __init paz00_init(void) 126static void __init paz00_init(void)
127{ 127{
@@ -133,9 +133,7 @@ static struct {
133 void (*init)(void); 133 void (*init)(void);
134} board_init_funcs[] = { 134} board_init_funcs[] = {
135 { "compulab,trimslice", trimslice_init }, 135 { "compulab,trimslice", trimslice_init },
136#ifdef CONFIG_MACH_HARMONY
137 { "nvidia,harmony", harmony_init }, 136 { "nvidia,harmony", harmony_init },
138#endif
139 { "compal,paz00", paz00_init }, 137 { "compal,paz00", paz00_init },
140}; 138};
141 139
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c
deleted file mode 100644
index 83d420fbc58c..000000000000
--- a/arch/arm/mach-tegra/board-harmony-pinmux.c
+++ /dev/null
@@ -1,156 +0,0 @@
1/*
2 * arch/arm/mach-tegra/board-harmony-pinmux.c
3 *
4 * Copyright (C) 2010 Google, Inc.
5 * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#include <linux/kernel.h>
19
20#include "board-harmony.h"
21#include "board-pinmux.h"
22
23static struct pinctrl_map harmony_map[] = {
24 TEGRA_MAP_MUXCONF("ata", "ide", none, driven),
25 TEGRA_MAP_MUXCONF("atb", "sdio4", none, driven),
26 TEGRA_MAP_MUXCONF("atc", "nand", none, driven),
27 TEGRA_MAP_MUXCONF("atd", "gmi", none, driven),
28 TEGRA_MAP_MUXCONF("ate", "gmi", none, driven),
29 TEGRA_MAP_MUXCONF("cdev1", "plla_out", none, driven),
30 TEGRA_MAP_MUXCONF("cdev2", "pllp_out4", down, tristate),
31 TEGRA_MAP_MUXCONF("crtp", "crt", none, tristate),
32 TEGRA_MAP_MUXCONF("csus", "vi_sensor_clk", down, tristate),
33 TEGRA_MAP_MUXCONF("dap1", "dap1", none, driven),
34 TEGRA_MAP_MUXCONF("dap2", "dap2", none, tristate),
35 TEGRA_MAP_MUXCONF("dap3", "dap3", none, tristate),
36 TEGRA_MAP_MUXCONF("dap4", "dap4", none, tristate),
37 TEGRA_MAP_MUXCONF("ddc", "i2c2", up, driven),
38 TEGRA_MAP_MUXCONF("dta", "sdio2", up, driven),
39 TEGRA_MAP_MUXCONF("dtb", "rsvd1", none, driven),
40 TEGRA_MAP_MUXCONF("dtc", "rsvd1", none, tristate),
41 TEGRA_MAP_MUXCONF("dtd", "sdio2", up, driven),
42 TEGRA_MAP_MUXCONF("dte", "rsvd1", none, tristate),
43 TEGRA_MAP_MUXCONF("dtf", "i2c3", none, tristate),
44 TEGRA_MAP_MUXCONF("gma", "sdio4", none, driven),
45 TEGRA_MAP_MUXCONF("gmb", "gmi", none, driven),
46 TEGRA_MAP_MUXCONF("gmc", "uartd", none, driven),
47 TEGRA_MAP_MUXCONF("gmd", "gmi", none, driven),
48 TEGRA_MAP_MUXCONF("gme", "sdio4", none, driven),
49 TEGRA_MAP_MUXCONF("gpu", "gmi", none, tristate),
50 TEGRA_MAP_MUXCONF("gpu7", "rtck", none, driven),
51 TEGRA_MAP_MUXCONF("gpv", "pcie", none, driven),
52 TEGRA_MAP_MUXCONF("hdint", "hdmi", na, tristate),
53 TEGRA_MAP_MUXCONF("i2cp", "i2cp", none, driven),
54 TEGRA_MAP_MUXCONF("irrx", "uarta", up, tristate),
55 TEGRA_MAP_MUXCONF("irtx", "uarta", up, tristate),
56 TEGRA_MAP_MUXCONF("kbca", "kbc", up, driven),
57 TEGRA_MAP_MUXCONF("kbcb", "kbc", up, driven),
58 TEGRA_MAP_MUXCONF("kbcc", "kbc", up, driven),
59 TEGRA_MAP_MUXCONF("kbcd", "kbc", up, driven),
60 TEGRA_MAP_MUXCONF("kbce", "kbc", up, driven),
61 TEGRA_MAP_MUXCONF("kbcf", "kbc", up, driven),
62 TEGRA_MAP_MUXCONF("lcsn", "displaya", na, tristate),
63 TEGRA_MAP_MUXCONF("ld0", "displaya", na, driven),
64 TEGRA_MAP_MUXCONF("ld1", "displaya", na, driven),
65 TEGRA_MAP_MUXCONF("ld10", "displaya", na, driven),
66 TEGRA_MAP_MUXCONF("ld11", "displaya", na, driven),
67 TEGRA_MAP_MUXCONF("ld12", "displaya", na, driven),
68 TEGRA_MAP_MUXCONF("ld13", "displaya", na, driven),
69 TEGRA_MAP_MUXCONF("ld14", "displaya", na, driven),
70 TEGRA_MAP_MUXCONF("ld15", "displaya", na, driven),
71 TEGRA_MAP_MUXCONF("ld16", "displaya", na, driven),
72 TEGRA_MAP_MUXCONF("ld17", "displaya", na, driven),
73 TEGRA_MAP_MUXCONF("ld2", "displaya", na, driven),
74 TEGRA_MAP_MUXCONF("ld3", "displaya", na, driven),
75 TEGRA_MAP_MUXCONF("ld4", "displaya", na, driven),
76 TEGRA_MAP_MUXCONF("ld5", "displaya", na, driven),
77 TEGRA_MAP_MUXCONF("ld6", "displaya", na, driven),
78 TEGRA_MAP_MUXCONF("ld7", "displaya", na, driven),
79 TEGRA_MAP_MUXCONF("ld8", "displaya", na, driven),
80 TEGRA_MAP_MUXCONF("ld9", "displaya", na, driven),
81 TEGRA_MAP_MUXCONF("ldc", "displaya", na, tristate),
82 TEGRA_MAP_MUXCONF("ldi", "displaya", na, driven),
83 TEGRA_MAP_MUXCONF("lhp0", "displaya", na, driven),
84 TEGRA_MAP_MUXCONF("lhp1", "displaya", na, driven),
85 TEGRA_MAP_MUXCONF("lhp2", "displaya", na, driven),
86 TEGRA_MAP_MUXCONF("lhs", "displaya", na, driven),
87 TEGRA_MAP_MUXCONF("lm0", "displaya", na, driven),
88 TEGRA_MAP_MUXCONF("lm1", "displaya", na, tristate),
89 TEGRA_MAP_MUXCONF("lpp", "displaya", na, driven),
90 TEGRA_MAP_MUXCONF("lpw0", "displaya", na, driven),
91 TEGRA_MAP_MUXCONF("lpw1", "displaya", na, tristate),
92 TEGRA_MAP_MUXCONF("lpw2", "displaya", na, driven),
93 TEGRA_MAP_MUXCONF("lsc0", "displaya", na, driven),
94 TEGRA_MAP_MUXCONF("lsc1", "displaya", na, tristate),
95 TEGRA_MAP_MUXCONF("lsck", "displaya", na, tristate),
96 TEGRA_MAP_MUXCONF("lsda", "displaya", na, tristate),
97 TEGRA_MAP_MUXCONF("lsdi", "displaya", na, tristate),
98 TEGRA_MAP_MUXCONF("lspi", "displaya", na, driven),
99 TEGRA_MAP_MUXCONF("lvp0", "displaya", na, tristate),
100 TEGRA_MAP_MUXCONF("lvp1", "displaya", na, driven),
101 TEGRA_MAP_MUXCONF("lvs", "displaya", na, driven),
102 TEGRA_MAP_MUXCONF("owc", "rsvd2", na, tristate),
103 TEGRA_MAP_MUXCONF("pmc", "pwr_on", na, driven),
104 TEGRA_MAP_MUXCONF("pta", "hdmi", none, driven),
105 TEGRA_MAP_MUXCONF("rm", "i2c1", none, driven),
106 TEGRA_MAP_MUXCONF("sdb", "pwm", na, tristate),
107 TEGRA_MAP_MUXCONF("sdc", "pwm", up, driven),
108 TEGRA_MAP_MUXCONF("sdd", "pwm", up, tristate),
109 TEGRA_MAP_MUXCONF("sdio1", "sdio1", none, tristate),
110 TEGRA_MAP_MUXCONF("slxa", "pcie", none, driven),
111 TEGRA_MAP_MUXCONF("slxc", "spdif", none, tristate),
112 TEGRA_MAP_MUXCONF("slxd", "spdif", none, tristate),
113 TEGRA_MAP_MUXCONF("slxk", "pcie", none, driven),
114 TEGRA_MAP_MUXCONF("spdi", "rsvd2", none, tristate),
115 TEGRA_MAP_MUXCONF("spdo", "rsvd2", none, tristate),
116 TEGRA_MAP_MUXCONF("spia", "gmi", none, driven),
117 TEGRA_MAP_MUXCONF("spib", "gmi", none, driven),
118 TEGRA_MAP_MUXCONF("spic", "gmi", up, tristate),
119 TEGRA_MAP_MUXCONF("spid", "spi1", down, tristate),
120 TEGRA_MAP_MUXCONF("spie", "spi1", up, tristate),
121 TEGRA_MAP_MUXCONF("spif", "spi1", down, tristate),
122 TEGRA_MAP_MUXCONF("spig", "spi2_alt", none, tristate),
123 TEGRA_MAP_MUXCONF("spih", "spi2_alt", up, tristate),
124 TEGRA_MAP_MUXCONF("uaa", "ulpi", up, tristate),
125 TEGRA_MAP_MUXCONF("uab", "ulpi", up, tristate),
126 TEGRA_MAP_MUXCONF("uac", "rsvd2", none, tristate),
127 TEGRA_MAP_MUXCONF("uad", "irda", up, tristate),
128 TEGRA_MAP_MUXCONF("uca", "uartc", up, tristate),
129 TEGRA_MAP_MUXCONF("ucb", "uartc", up, tristate),
130 TEGRA_MAP_MUXCONF("uda", "ulpi", none, tristate),
131 TEGRA_MAP_CONF("ck32", none, na),
132 TEGRA_MAP_CONF("ddrc", none, na),
133 TEGRA_MAP_CONF("pmca", none, na),
134 TEGRA_MAP_CONF("pmcb", none, na),
135 TEGRA_MAP_CONF("pmcc", none, na),
136 TEGRA_MAP_CONF("pmcd", none, na),
137 TEGRA_MAP_CONF("pmce", none, na),
138 TEGRA_MAP_CONF("xm2c", none, na),
139 TEGRA_MAP_CONF("xm2d", none, na),
140 TEGRA_MAP_CONF("ls", up, na),
141 TEGRA_MAP_CONF("lc", up, na),
142 TEGRA_MAP_CONF("ld17_0", down, na),
143 TEGRA_MAP_CONF("ld19_18", down, na),
144 TEGRA_MAP_CONF("ld21_20", down, na),
145 TEGRA_MAP_CONF("ld23_22", down, na),
146};
147
148static struct tegra_board_pinmux_conf conf = {
149 .maps = harmony_map,
150 .map_count = ARRAY_SIZE(harmony_map),
151};
152
153void harmony_pinmux_init(void)
154{
155 tegra_board_pinmux_init(&conf, NULL);
156}
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}
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
deleted file mode 100644
index e65e837f4013..000000000000
--- a/arch/arm/mach-tegra/board-harmony.c
+++ /dev/null
@@ -1,197 +0,0 @@
1/*
2 * arch/arm/mach-tegra/board-harmony.c
3 *
4 * Copyright (C) 2010 Google, Inc.
5 * Copyright (C) 2011 NVIDIA, Inc.
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/platform_device.h>
21#include <linux/serial_8250.h>
22#include <linux/of_serial.h>
23#include <linux/clk.h>
24#include <linux/dma-mapping.h>
25#include <linux/pda_power.h>
26#include <linux/io.h>
27#include <linux/gpio.h>
28#include <linux/i2c.h>
29
30#include <sound/wm8903.h>
31
32#include <asm/mach-types.h>
33#include <asm/mach/arch.h>
34#include <asm/mach/time.h>
35#include <asm/hardware/gic.h>
36#include <asm/setup.h>
37
38#include <mach/tegra_wm8903_pdata.h>
39#include <mach/iomap.h>
40#include <mach/irqs.h>
41#include <mach/sdhci.h>
42
43#include "board.h"
44#include "board-harmony.h"
45#include "clock.h"
46#include "devices.h"
47#include "gpio-names.h"
48
49static struct plat_serial8250_port debug_uart_platform_data[] = {
50 {
51 .membase = IO_ADDRESS(TEGRA_UARTD_BASE),
52 .mapbase = TEGRA_UARTD_BASE,
53 .irq = INT_UARTD,
54 .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE,
55 .type = PORT_TEGRA,
56 .handle_break = tegra_serial_handle_break,
57 .iotype = UPIO_MEM,
58 .regshift = 2,
59 .uartclk = 216000000,
60 }, {
61 .flags = 0
62 }
63};
64
65static struct platform_device debug_uart = {
66 .name = "serial8250",
67 .id = PLAT8250_DEV_PLATFORM,
68 .dev = {
69 .platform_data = debug_uart_platform_data,
70 },
71};
72
73static struct tegra_wm8903_platform_data harmony_audio_pdata = {
74 .gpio_spkr_en = TEGRA_GPIO_SPKR_EN,
75 .gpio_hp_det = TEGRA_GPIO_HP_DET,
76 .gpio_hp_mute = -1,
77 .gpio_int_mic_en = TEGRA_GPIO_INT_MIC_EN,
78 .gpio_ext_mic_en = TEGRA_GPIO_EXT_MIC_EN,
79};
80
81static struct platform_device harmony_audio_device = {
82 .name = "tegra-snd-wm8903",
83 .id = 0,
84 .dev = {
85 .platform_data = &harmony_audio_pdata,
86 },
87};
88
89static struct wm8903_platform_data harmony_wm8903_pdata = {
90 .irq_active_low = 0,
91 .micdet_cfg = 0,
92 .micdet_delay = 100,
93 .gpio_base = HARMONY_GPIO_WM8903(0),
94 .gpio_cfg = {
95 0,
96 0,
97 WM8903_GPIO_CONFIG_ZERO,
98 0,
99 0,
100 },
101};
102
103static struct i2c_board_info __initdata wm8903_board_info = {
104 I2C_BOARD_INFO("wm8903", 0x1a),
105 .platform_data = &harmony_wm8903_pdata,
106};
107
108static void __init harmony_i2c_init(void)
109{
110 platform_device_register(&tegra_i2c_device1);
111 platform_device_register(&tegra_i2c_device2);
112 platform_device_register(&tegra_i2c_device3);
113 platform_device_register(&tegra_i2c_device4);
114
115 wm8903_board_info.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ);
116 i2c_register_board_info(0, &wm8903_board_info, 1);
117}
118
119static struct platform_device *harmony_devices[] __initdata = {
120 &debug_uart,
121 &tegra_sdhci_device1,
122 &tegra_sdhci_device2,
123 &tegra_sdhci_device4,
124 &tegra_ehci3_device,
125 &tegra_i2s_device1,
126 &tegra_das_device,
127 &harmony_audio_device,
128};
129
130static void __init tegra_harmony_fixup(struct tag *tags, char **cmdline,
131 struct meminfo *mi)
132{
133 mi->nr_banks = 2;
134 mi->bank[0].start = PHYS_OFFSET;
135 mi->bank[0].size = 448 * SZ_1M;
136 mi->bank[1].start = SZ_512M;
137 mi->bank[1].size = SZ_512M;
138}
139
140static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
141 /* name parent rate enabled */
142 { "uartd", "pll_p", 216000000, true },
143 { "pll_a", "pll_p_out1", 56448000, true },
144 { "pll_a_out0", "pll_a", 11289600, true },
145 { "cdev1", NULL, 0, true },
146 { "i2s1", "pll_a_out0", 11289600, false},
147 { "usb3", "clk_m", 12000000, true },
148 { NULL, NULL, 0, 0},
149};
150
151
152static struct tegra_sdhci_platform_data sdhci_pdata1 = {
153 .cd_gpio = -1,
154 .wp_gpio = -1,
155 .power_gpio = -1,
156};
157
158static struct tegra_sdhci_platform_data sdhci_pdata2 = {
159 .cd_gpio = TEGRA_GPIO_SD2_CD,
160 .wp_gpio = TEGRA_GPIO_SD2_WP,
161 .power_gpio = TEGRA_GPIO_SD2_POWER,
162};
163
164static struct tegra_sdhci_platform_data sdhci_pdata4 = {
165 .cd_gpio = TEGRA_GPIO_SD4_CD,
166 .wp_gpio = TEGRA_GPIO_SD4_WP,
167 .power_gpio = TEGRA_GPIO_SD4_POWER,
168 .is_8bit = 1,
169};
170
171static void __init tegra_harmony_init(void)
172{
173 tegra_clk_init_from_table(harmony_clk_init_table);
174
175 harmony_pinmux_init();
176
177 tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1;
178 tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2;
179 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
180
181 platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
182 harmony_i2c_init();
183 harmony_regulator_init();
184}
185
186MACHINE_START(HARMONY, "harmony")
187 .atag_offset = 0x100,
188 .fixup = tegra_harmony_fixup,
189 .map_io = tegra_map_common_io,
190 .init_early = tegra20_init_early,
191 .init_irq = tegra_init_irq,
192 .handle_irq = gic_handle_irq,
193 .timer = &tegra_timer,
194 .init_machine = tegra_harmony_init,
195 .init_late = tegra_init_late,
196 .restart = tegra_assert_system_reset,
197MACHINE_END
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index 139d96c93843..7ae87088acf8 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -20,22 +20,9 @@
20#include <mach/gpio-tegra.h> 20#include <mach/gpio-tegra.h>
21 21
22#define HARMONY_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_)) 22#define HARMONY_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_))
23#define HARMONY_GPIO_WM8903(_x_) (HARMONY_GPIO_TPS6586X(4) + (_x_))
24 23
25#define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5
26#define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1
27#define TEGRA_GPIO_SD2_POWER TEGRA_GPIO_PT3
28#define TEGRA_GPIO_SD4_CD TEGRA_GPIO_PH2
29#define TEGRA_GPIO_SD4_WP TEGRA_GPIO_PH3
30#define TEGRA_GPIO_SD4_POWER TEGRA_GPIO_PI6
31#define TEGRA_GPIO_CDC_IRQ TEGRA_GPIO_PX3
32#define TEGRA_GPIO_SPKR_EN HARMONY_GPIO_WM8903(2)
33#define TEGRA_GPIO_HP_DET TEGRA_GPIO_PW2
34#define TEGRA_GPIO_INT_MIC_EN TEGRA_GPIO_PX0
35#define TEGRA_GPIO_EXT_MIC_EN TEGRA_GPIO_PX1
36#define TEGRA_GPIO_EN_VDD_1V05_GPIO HARMONY_GPIO_TPS6586X(2) 24#define TEGRA_GPIO_EN_VDD_1V05_GPIO HARMONY_GPIO_TPS6586X(2)
37 25
38void harmony_pinmux_init(void);
39int harmony_regulator_init(void); 26int harmony_regulator_init(void);
40 27
41#endif 28#endif