diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-pinmux.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c index 7a4a26d5174c..465808c8ac0b 100644 --- a/arch/arm/mach-tegra/board-harmony-pinmux.c +++ b/arch/arm/mach-tegra/board-harmony-pinmux.c | |||
@@ -19,10 +19,11 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | 20 | ||
21 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
22 | #include <mach/pinmux-tegra20.h> | ||
22 | 23 | ||
23 | #include "gpio-names.h" | 24 | #include "gpio-names.h" |
24 | #include "board-harmony.h" | 25 | #include "board-harmony.h" |
25 | #include "devices.h" | 26 | #include "board-pinmux.h" |
26 | 27 | ||
27 | static struct tegra_pingroup_config harmony_pinmux[] = { | 28 | static struct tegra_pingroup_config harmony_pinmux[] = { |
28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 29 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
@@ -143,11 +144,6 @@ static struct tegra_pingroup_config harmony_pinmux[] = { | |||
143 | {TEGRA_PINGROUP_XM2D, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 144 | {TEGRA_PINGROUP_XM2D, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
144 | }; | 145 | }; |
145 | 146 | ||
146 | static struct platform_device *pinmux_devices[] = { | ||
147 | &tegra_gpio_device, | ||
148 | &tegra_pinmux_device, | ||
149 | }; | ||
150 | |||
151 | static struct tegra_gpio_table gpio_table[] = { | 147 | static struct tegra_gpio_table gpio_table[] = { |
152 | { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, | 148 | { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, |
153 | { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, | 149 | { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, |
@@ -161,13 +157,14 @@ static struct tegra_gpio_table gpio_table[] = { | |||
161 | { .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true }, | 157 | { .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true }, |
162 | }; | 158 | }; |
163 | 159 | ||
160 | static struct tegra_board_pinmux_conf conf = { | ||
161 | .pgs = harmony_pinmux, | ||
162 | .pg_count = ARRAY_SIZE(harmony_pinmux), | ||
163 | .gpios = gpio_table, | ||
164 | .gpio_count = ARRAY_SIZE(gpio_table), | ||
165 | }; | ||
166 | |||
164 | void harmony_pinmux_init(void) | 167 | void harmony_pinmux_init(void) |
165 | { | 168 | { |
166 | if (!of_machine_is_compatible("nvidia,tegra20")) | 169 | tegra_board_pinmux_init(&conf, NULL); |
167 | platform_add_devices(pinmux_devices, | ||
168 | ARRAY_SIZE(pinmux_devices)); | ||
169 | |||
170 | tegra_pinmux_config_table(harmony_pinmux, ARRAY_SIZE(harmony_pinmux)); | ||
171 | |||
172 | tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); | ||
173 | } | 170 | } |