blob: df00bf412c47f6573eb85221104ef8cc8363dca5 [file] [log] [blame]
From adce5cd34b053ac21e842fd67048990b85ac6fa4 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <>
Date: Wed, 15 Jan 2020 07:25:26 -0600
Subject: [PATCH] usb: musb: omap2430: Get rid of musb .set_vbus for omap2430
commit 91b6dec32e5c25fbdbb564d1e5af23764ec17ef1 upstream.
We currently have musb_set_vbus() called from two different paths. Mostly
it gets called from the USB PHY via omap_musb_set_mailbox(), but in some
cases it can get also called from musb_stage0_irq() rather via .set_vbus:
(musb_set_host [musb_hdrc])
(omap2430_musb_set_vbus [omap2430])
(musb_stage0_irq [musb_hdrc])
(musb_interrupt [musb_hdrc])
(omap2430_musb_interrupt [omap2430])
This is racy and will not work with introducing generic helper functions
for musb_set_host() and musb_set_peripheral(). We want to get rid of the
busy loops in favor of usleep_range().
Let's just get rid of .set_vbus for omap2430 glue layer and let the PHY
code handle VBUS with musb_set_vbus(). Note that in the follow-up patch
we can completely remove omap2430_musb_set_vbus(), but let's do it in a
separate patch as this change may actually turn out to be needed as a
Reported-by: Pavel Machek <>
Acked-by: Pavel Machek <>
Signed-off-by: Tony Lindgren <>
Signed-off-by: Bin Liu <>
Signed-off-by: Greg Kroah-Hartman <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index a3d2fef67746..5c93226e0e20 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -361,8 +361,6 @@ static const struct musb_platform_ops omap2430_ops = {
.init = omap2430_musb_init,
.exit = omap2430_musb_exit,
- .set_vbus = omap2430_musb_set_vbus,
.enable = omap2430_musb_enable,
.disable = omap2430_musb_disable,