diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-pinmux.c | 22 |
1 files changed, 9 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..5038f5b130e6 100644 --- a/arch/arm/mach-tegra/board-harmony-pinmux.c +++ b/arch/arm/mach-tegra/board-harmony-pinmux.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include "gpio-names.h" | 23 | #include "gpio-names.h" |
24 | #include "board-harmony.h" | 24 | #include "board-harmony.h" |
25 | #include "devices.h" | 25 | #include "board-pinmux.h" |
26 | 26 | ||
27 | static struct tegra_pingroup_config harmony_pinmux[] = { | 27 | static struct tegra_pingroup_config harmony_pinmux[] = { |
28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
@@ -143,11 +143,6 @@ static struct tegra_pingroup_config harmony_pinmux[] = { | |||
143 | {TEGRA_PINGROUP_XM2D, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 143 | {TEGRA_PINGROUP_XM2D, TEGRA_MUX_NONE, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
144 | }; | 144 | }; |
145 | 145 | ||
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[] = { | 146 | static struct tegra_gpio_table gpio_table[] = { |
152 | { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, | 147 | { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, |
153 | { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, | 148 | { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, |
@@ -161,13 +156,14 @@ static struct tegra_gpio_table gpio_table[] = { | |||
161 | { .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true }, | 156 | { .gpio = TEGRA_GPIO_EXT_MIC_EN, .enable = true }, |
162 | }; | 157 | }; |
163 | 158 | ||
159 | static struct tegra_board_pinmux_conf conf = { | ||
160 | .pgs = harmony_pinmux, | ||
161 | .pg_count = ARRAY_SIZE(harmony_pinmux), | ||
162 | .gpios = gpio_table, | ||
163 | .gpio_count = ARRAY_SIZE(gpio_table), | ||
164 | }; | ||
165 | |||
164 | void harmony_pinmux_init(void) | 166 | void harmony_pinmux_init(void) |
165 | { | 167 | { |
166 | if (!of_machine_is_compatible("nvidia,tegra20")) | 168 | 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 | } | 169 | } |