summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorGeorge Cherian2014-07-16 14:52:11 +0200
committerFelipe Balbi2014-07-16 16:59:58 +0200
commitd871c622e202efc663f953a4fcbd2cba6a28a24f (patch)
tree3b55073f60857eb84e4587b23a2d88ab9cdc7cb0 /drivers/usb/musb/musb_core.c
parentusb: musb: core: Convert babble recover work to delayed work (diff)
downloadkernel-qcow2-linux-d871c622e202efc663f953a4fcbd2cba6a28a24f.tar.gz
kernel-qcow2-linux-d871c622e202efc663f953a4fcbd2cba6a28a24f.tar.xz
kernel-qcow2-linux-d871c622e202efc663f953a4fcbd2cba6a28a24f.zip
usb: musb: core: Convert the musb_platform_reset to have a return value.
Currently musb_platform_reset() is only used by dsps. In case of BABBLE interrupt for other platforms the musb_platform_reset() is a NOP. In such situations no need to re-initialize the endpoints. Also in the latest silicon revision of AM335x, we do have a babble recovery mechanism without resetting the IP block. In preperation to add that support its better to have a rest_done return for musb_platform_reset(). Signed-off-by: George Cherian <george.cherian@ti.com> Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c0ce09f8fdcd..b841ee0bff06 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1753,9 +1753,11 @@ static void musb_irq_work(struct work_struct *data)
static void musb_recover_work(struct work_struct *data)
{
struct musb *musb = container_of(data, struct musb, recover_work.work);
- int status;
+ int status, ret;
- musb_platform_reset(musb);
+ ret = musb_platform_reset(musb);
+ if (ret)
+ return;
usb_phy_vbus_off(musb->xceiv);
usleep_range(100, 200);
@@ -1764,8 +1766,8 @@ static void musb_recover_work(struct work_struct *data)
usleep_range(100, 200);
/*
- * When a babble condition occurs, the musb controller removes the
- * session bit and the endpoint config is lost.
+ * When a babble condition occurs, the musb controller
+ * removes the session bit and the endpoint config is lost.
*/
if (musb->dyn_fifo)
status = ep_config_from_table(musb);