aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/board-seaboard.c17
-rw-r--r--arch/arm/mach-tegra/board-trimslice.c15
2 files changed, 9 insertions, 23 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index d669847f0485..6fa8c3d0f76e 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -24,6 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/gpio_keys.h> 26#include <linux/gpio_keys.h>
27#include <linux/platform_data/tegra_usb.h>
27 28
28#include <sound/wm8903.h> 29#include <sound/wm8903.h>
29 30
@@ -186,20 +187,10 @@ static struct i2c_board_info __initdata wm8903_device = {
186 187
187static int seaboard_ehci_init(void) 188static int seaboard_ehci_init(void)
188{ 189{
189 int gpio_status; 190 struct tegra_ehci_platform_data *pdata;
190 191
191 gpio_status = gpio_request(TEGRA_GPIO_USB1, "VBUS_USB1"); 192 pdata = tegra_ehci1_device.dev.platform_data;
192 if (gpio_status < 0) { 193 pdata->vbus_gpio = TEGRA_GPIO_USB1;
193 pr_err("VBUS_USB1 request GPIO FAILED\n");
194 WARN_ON(1);
195 }
196
197 gpio_status = gpio_direction_output(TEGRA_GPIO_USB1, 1);
198 if (gpio_status < 0) {
199 pr_err("VBUS_USB1 request GPIO DIRECTION FAILED\n");
200 WARN_ON(1);
201 }
202 gpio_set_value(TEGRA_GPIO_USB1, 1);
203 194
204 platform_device_register(&tegra_ehci1_device); 195 platform_device_register(&tegra_ehci1_device);
205 platform_device_register(&tegra_ehci3_device); 196 platform_device_register(&tegra_ehci3_device);
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index cd52820a3e37..f6f5b6a11325 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -25,6 +25,7 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/platform_data/tegra_usb.h>
28 29
29#include <asm/hardware/gic.h> 30#include <asm/hardware/gic.h>
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
@@ -111,19 +112,13 @@ static void trimslice_i2c_init(void)
111 112
112static void trimslice_usb_init(void) 113static void trimslice_usb_init(void)
113{ 114{
114 int err; 115 struct tegra_ehci_platform_data *pdata;
115 116
116 platform_device_register(&tegra_ehci3_device); 117 pdata = tegra_ehci1_device.dev.platform_data;
118 pdata->vbus_gpio = TRIMSLICE_GPIO_USB1_MODE;
117 119
120 platform_device_register(&tegra_ehci3_device);
118 platform_device_register(&tegra_ehci2_device); 121 platform_device_register(&tegra_ehci2_device);
119
120 err = gpio_request_one(TRIMSLICE_GPIO_USB1_MODE, GPIOF_OUT_INIT_HIGH,
121 "usb1mode");
122 if (err) {
123 pr_err("TrimSlice: failed to obtain USB1 mode gpio: %d\n", err);
124 return;
125 }
126
127 platform_device_register(&tegra_ehci1_device); 122 platform_device_register(&tegra_ehci1_device);
128} 123}
129 124