aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31_3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31_3ds.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 58e57291b79d..7e8d09ab9e6c 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -182,8 +182,10 @@ static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = {
182 182
183#define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR) 183#define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR)
184 184
185static void mx31_3ds_usbotg_init(void) 185static int mx31_3ds_usbotg_init(void)
186{ 186{
187 int err;
188
187 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG); 189 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG);
188 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG); 190 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG);
189 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG); 191 mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG);
@@ -197,10 +199,25 @@ static void mx31_3ds_usbotg_init(void)
197 mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG); 199 mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG);
198 mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG); 200 mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG);
199 201
200 gpio_request(USBOTG_RST_B, "otgusb-reset"); 202 err = gpio_request(USBOTG_RST_B, "otgusb-reset");
201 gpio_direction_output(USBOTG_RST_B, 0); 203 if (err) {
204 pr_err("Failed to request the USB OTG reset gpio\n");
205 return err;
206 }
207
208 err = gpio_direction_output(USBOTG_RST_B, 0);
209 if (err) {
210 pr_err("Failed to drive the USB OTG reset gpio\n");
211 goto usbotg_free_reset;
212 }
213
202 mdelay(1); 214 mdelay(1);
203 gpio_set_value(USBOTG_RST_B, 1); 215 gpio_set_value(USBOTG_RST_B, 1);
216 return 0;
217
218usbotg_free_reset:
219 gpio_free(USBOTG_RST_B);
220 return err;
204} 221}
205 222
206static struct fsl_usb2_platform_data usbotg_pdata = { 223static struct fsl_usb2_platform_data usbotg_pdata = {