diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-trimslice-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-trimslice-pinmux.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c index 5daa6e858a1e..be2f3e8f95f1 100644 --- a/arch/arm/mach-tegra/board-trimslice-pinmux.c +++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c | |||
@@ -21,8 +21,8 @@ | |||
21 | #include <mach/pinmux.h> | 21 | #include <mach/pinmux.h> |
22 | 22 | ||
23 | #include "gpio-names.h" | 23 | #include "gpio-names.h" |
24 | #include "board-pinmux.h" | ||
24 | #include "board-trimslice.h" | 25 | #include "board-trimslice.h" |
25 | #include "devices.h" | ||
26 | 26 | ||
27 | static __initdata struct tegra_pingroup_config trimslice_pinmux[] = { | 27 | static __initdata struct tegra_pingroup_config trimslice_pinmux[] = { |
28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_IDE, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, |
@@ -143,11 +143,6 @@ static __initdata struct tegra_pingroup_config trimslice_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 = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */ | 147 | { .gpio = TRIMSLICE_GPIO_SD4_CD, .enable = true }, /* mmc4 cd */ |
153 | { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */ | 148 | { .gpio = TRIMSLICE_GPIO_SD4_WP, .enable = true }, /* mmc4 wp */ |
@@ -156,11 +151,14 @@ static struct tegra_gpio_table gpio_table[] = { | |||
156 | { .gpio = TRIMSLICE_GPIO_USB2_RST, .enable = true }, /* USB2 PHY rst */ | 151 | { .gpio = TRIMSLICE_GPIO_USB2_RST, .enable = true }, /* USB2 PHY rst */ |
157 | }; | 152 | }; |
158 | 153 | ||
159 | void __init trimslice_pinmux_init(void) | 154 | static struct tegra_board_pinmux_conf conf = { |
155 | .pgs = trimslice_pinmux, | ||
156 | .pg_count = ARRAY_SIZE(trimslice_pinmux), | ||
157 | .gpios = gpio_table, | ||
158 | .gpio_count = ARRAY_SIZE(gpio_table), | ||
159 | }; | ||
160 | |||
161 | void trimslice_pinmux_init(void) | ||
160 | { | 162 | { |
161 | if (!of_machine_is_compatible("nvidia,tegra20")) | 163 | tegra_board_pinmux_init(&conf, NULL); |
162 | platform_add_devices(pinmux_devices, | ||
163 | ARRAY_SIZE(pinmux_devices)); | ||
164 | tegra_pinmux_config_table(trimslice_pinmux, ARRAY_SIZE(trimslice_pinmux)); | ||
165 | tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); | ||
166 | } | 164 | } |