aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-cm-t35.c
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2011-12-13 13:48:53 -0500
committerTony Lindgren <tony@atomide.com>2011-12-13 13:48:53 -0500
commit039401f3efa890cd9974d8921c19359ac2084df3 (patch)
treed7adfd4bb61b7552ab94270651a842e78796e5b3 /arch/arm/mach-omap2/board-cm-t35.c
parent19ce643997c5b75df2410e9b632c2c29e6cf8ae2 (diff)
ARM: OMAP3: cm-t35: Add reset for USB hub
USB hub is not functional until is reset. Reset the USB hub on SB-T35. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> [tony@atomide.com: updated subject] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index c417b7d004d1..865f96da771e 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -53,7 +53,8 @@
53#include "hsmmc.h" 53#include "hsmmc.h"
54#include "common-board-devices.h" 54#include "common-board-devices.h"
55 55
56#define CM_T35_GPIO_PENDOWN 57 56#define CM_T35_GPIO_PENDOWN 57
57#define SB_T35_USB_HUB_RESET_GPIO 167
57 58
58#define CM_T35_SMSC911X_CS 5 59#define CM_T35_SMSC911X_CS 5
59#define CM_T35_SMSC911X_GPIO 163 60#define CM_T35_SMSC911X_GPIO 163
@@ -436,6 +437,23 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = {
436 .reset_gpio_port[2] = -EINVAL 437 .reset_gpio_port[2] = -EINVAL
437}; 438};
438 439
440static void cm_t35_init_usbh(void)
441{
442 int err;
443
444 err = gpio_request_one(SB_T35_USB_HUB_RESET_GPIO,
445 GPIOF_OUT_INIT_LOW, "usb hub rst");
446 if (err) {
447 pr_err("SB-T35: usb hub rst gpio request failed: %d\n", err);
448 } else {
449 udelay(10);
450 gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1);
451 msleep(1);
452 }
453
454 usbhs_init(&usbhs_bdata);
455}
456
439static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, 457static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
440 unsigned ngpio) 458 unsigned ngpio)
441{ 459{
@@ -624,7 +642,7 @@ static void __init cm_t3x_common_init(void)
624 cm_t35_init_display(); 642 cm_t35_init_display();
625 643
626 usb_musb_init(NULL); 644 usb_musb_init(NULL);
627 usbhs_init(&usbhs_bdata); 645 cm_t35_init_usbh();
628} 646}
629 647
630static void __init cm_t35_init(void) 648static void __init cm_t35_init(void)