aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-02-23 14:40:14 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2011-02-25 12:58:09 +0100
commitc144af05f70ef9d850f74890445dbf40a9ac23b6 (patch)
tree1eb1bea55f936d416ced48c98798a2f9eb1ec668 /drivers/usb
parent3ad9f337b35376e8f6ac271fa014261f7e8b5540 (diff)
USB:Fix for OPT bus suspend issue
OPT detects the bus getting suspended after 3 ms after the board suspends the bus.OTG_TIME_A_AIDL_BDIS timer is a 200ms timer which gets triggered immediately after the bus is suspended by our board.After this timer expires vbus will be put low and as vbus is being put low, OPT detects that as a disconnection before 200ms of its timer and test gets failed. ST-Ericsson ID:ER 321374 Change-Id: I9e5a69f0c7e58011cdc6971fce6942d0087d080b Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16764 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.h1
-rw-r--r--drivers/usb/musb/musb_virthub.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7a62a3fc8de..7620a846ae9 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -202,6 +202,7 @@ enum musb_g_ep0_state {
#define OTG_TIME_A_WAIT_BCON 1100 /* min 1 second */
#define OTG_TIME_A_AIDL_BDIS 200 /* min 200 msec */
#define OTG_TIME_B_ASE0_BRST 100 /* min 3.125 ms */
+#define USB_SUSP_DET_DURATION 3 /* suspend time 3ms */
/*************************** REGISTER ACCESS ********************************/
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 92e85e027cf..663dda191dd 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -84,8 +84,9 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
&& musb->xceiv->host->b_hnp_enable;
if (musb->is_active)
mod_timer(&musb->otg_timer, jiffies
- + msecs_to_jiffies(
- OTG_TIME_A_AIDL_BDIS));
+ + msecs_to_jiffies((
+ OTG_TIME_A_AIDL_BDIS +
+ USB_SUSP_DET_DURATION)));
musb_platform_try_idle(musb, 0);
break;
#ifdef CONFIG_USB_MUSB_OTG