aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-03-16 14:27:41 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2011-03-17 09:56:30 +0100
commit125c488d8908679a176a685e1c075567be97fbc4 (patch)
treef2929c7bde881385f53d49dcee3527d7c4737bf0 /drivers/usb
parentbc05444ddc6b4a083b637b435e5754b3809f8566 (diff)
ux500:USB:Fix for test case TD.6.8-SuspendTime=5s,ResumeTime=1ms.html
This is workaround for the hardware bug. On the present hardware the vbus will not fall quickly. Writing to the ulpi register to make the vbus to fall quickly. ST-Ericsson ID:ER 321374 Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Change-Id: I76ccfa4efbf3b5451e1ec41a8595aeef9e21edbc Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/18456 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.c2
-rw-r--r--drivers/usb/musb/musb_core.h2
-rw-r--r--drivers/usb/musb/stm_musb.c9
3 files changed, 10 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index e02c2a5817f..7001ab1b254 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -520,7 +520,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
(USB_PORT_STAT_C_SUSPEND << 16)
| MUSB_PORT_STAT_RESUME;
musb->rh_timer = jiffies
- + msecs_to_jiffies(20);
+ + msecs_to_jiffies(30);
musb->xceiv->state = OTG_STATE_A_HOST;
musb->is_active = 1;
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index c5d643e3dc5..c037939a8a2 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -202,7 +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 */
+#define USB_SUSP_DET_DURATION 5 /* suspend time 5ms */
/*************************** REGISTER ACCESS ********************************/
diff --git a/drivers/usb/musb/stm_musb.c b/drivers/usb/musb/stm_musb.c
index 652c4af6de0..046ad283052 100644
--- a/drivers/usb/musb/stm_musb.c
+++ b/drivers/usb/musb/stm_musb.c
@@ -233,6 +233,7 @@ static u8 ulpi_read_register(struct musb *musb, u8 address)
return val;
}
+#endif
/**
* ulpi_write_register() - Write to a usb phy's ULPI register
@@ -292,7 +293,7 @@ static u8 ulpi_write_register(struct musb *musb, u8 address, u8 data)
return 0;
}
-#endif
+
/**
* musb_stm_hs_otg_init() - Initialize the USB for paltform specific.
@@ -437,6 +438,12 @@ static void set_vbus(struct musb *musb, int is_on)
/* otg %3x conf %08x prcm %08x */ "\n",
otg_state_string(musb),
musb_readb(musb->mregs, MUSB_DEVCTL));
+ if (!is_on) {
+ /* Discahrge the VBUS */
+ if (musb_status == NULL)
+ return;
+ ulpi_write_register(musb_status, ULPI_OCTRL, 0x08);
+ }
}
/**
* set_power() - Set the power for the USB transceiver.