diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-paz00-pinmux.c')
-rw-r--r-- | arch/arm/mach-tegra/board-paz00-pinmux.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index be30e215f4b7..c775572dcea4 100644 --- a/arch/arm/mach-tegra/board-paz00-pinmux.c +++ b/arch/arm/mach-tegra/board-paz00-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-paz00.h" | 25 | #include "board-paz00.h" |
25 | #include "devices.h" | 26 | #include "board-pinmux.h" |
26 | 27 | ||
27 | static struct tegra_pingroup_config paz00_pinmux[] = { | 28 | static struct tegra_pingroup_config paz00_pinmux[] = { |
28 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 29 | {TEGRA_PINGROUP_ATA, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
@@ -30,7 +31,7 @@ static struct tegra_pingroup_config paz00_pinmux[] = { | |||
30 | {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 31 | {TEGRA_PINGROUP_ATC, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
31 | {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 32 | {TEGRA_PINGROUP_ATD, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
32 | {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, | 33 | {TEGRA_PINGROUP_ATE, TEGRA_MUX_GMI, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
33 | {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 34 | {TEGRA_PINGROUP_CDEV1, TEGRA_MUX_PLLA_OUT, TEGRA_PUPD_NORMAL, TEGRA_TRI_NORMAL}, |
34 | {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, | 35 | {TEGRA_PINGROUP_CDEV2, TEGRA_MUX_PLLP_OUT4, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, |
35 | {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, | 36 | {TEGRA_PINGROUP_CRTP, TEGRA_MUX_CRT, TEGRA_PUPD_NORMAL, TEGRA_TRI_TRISTATE}, |
36 | {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, | 37 | {TEGRA_PINGROUP_CSUS, TEGRA_MUX_PLLC_OUT1, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_TRISTATE}, |
@@ -143,11 +144,6 @@ static struct tegra_pingroup_config paz00_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_SD1_CD, .enable = true }, | 148 | { .gpio = TEGRA_GPIO_SD1_CD, .enable = true }, |
153 | { .gpio = TEGRA_GPIO_SD1_WP, .enable = true }, | 149 | { .gpio = TEGRA_GPIO_SD1_WP, .enable = true }, |
@@ -158,13 +154,14 @@ static struct tegra_gpio_table gpio_table[] = { | |||
158 | { .gpio = TEGRA_WIFI_LED, .enable = true }, | 154 | { .gpio = TEGRA_WIFI_LED, .enable = true }, |
159 | }; | 155 | }; |
160 | 156 | ||
157 | static struct tegra_board_pinmux_conf conf = { | ||
158 | .pgs = paz00_pinmux, | ||
159 | .pg_count = ARRAY_SIZE(paz00_pinmux), | ||
160 | .gpios = gpio_table, | ||
161 | .gpio_count = ARRAY_SIZE(gpio_table), | ||
162 | }; | ||
163 | |||
161 | void paz00_pinmux_init(void) | 164 | void paz00_pinmux_init(void) |
162 | { | 165 | { |
163 | if (!of_machine_is_compatible("nvidia,tegra20")) | 166 | tegra_board_pinmux_init(&conf, NULL); |
164 | platform_add_devices(pinmux_devices, | ||
165 | ARRAY_SIZE(pinmux_devices)); | ||
166 | |||
167 | tegra_pinmux_config_table(paz00_pinmux, ARRAY_SIZE(paz00_pinmux)); | ||
168 | |||
169 | tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); | ||
170 | } | 167 | } |