summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2015-02-26 14:00:52 -0600
committerFelipe Balbi <balbi@ti.com>2015-03-10 15:33:28 -0500
commit011d0dd5400b84e593eecfc4a17fcfb6c0c5ac60 (patch)
tree3df67d75726e3ff53e182cab8d065bb2d09c23aa /drivers
parentd5fa3e9f7398adf337f03fa3257d5e9b214078ee (diff)
usb: musb: dsps: do not reset musb on babble
All we have to do is, really, drop session bit and let the session restart. Big thanks goes to Bin Liu <b-liu@ti.com> for inspiring this work. Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/musb/musb_dsps.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 85ebfa2c3858..a159de1225f3 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -604,31 +604,12 @@ static int dsps_musb_reset(struct musb *musb)
{
struct device *dev = musb->controller;
struct dsps_glue *glue = dev_get_drvdata(dev->parent);
- const struct dsps_musb_wrapper *wrp = glue->wrp;
- int session_restart = 0, error;
+ int session_restart = 0;
if (glue->sw_babble_enabled)
session_restart = dsps_sw_babble_control(musb);
- /*
- * In case of new silicon version babble condition can be recovered
- * without resetting the MUSB. But for older silicon versions, MUSB
- * reset is needed
- */
- if (session_restart || !glue->sw_babble_enabled) {
- dev_info(musb->controller, "Restarting MUSB to recover from Babble\n");
- dsps_writel(musb->ctrl_base, wrp->control, (1 << wrp->reset));
- usleep_range(100, 200);
- usb_phy_shutdown(musb->xceiv);
- error = phy_power_off(musb->phy);
- if (error)
- dev_err(dev, "phy shutdown failed: %i\n", error);
- usleep_range(100, 200);
- usb_phy_init(musb->xceiv);
- error = phy_power_on(musb->phy);
- if (error)
- dev_err(dev, "phy powerup failed: %i\n", error);
+ else
session_restart = 1;
- }
return session_restart ? 0 : -EPIPE;
}