summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_virthub.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 13:56:29 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 13:56:29 -0700
commit1cd572fc0c5f6887ea0542e2d3ec26625e2cdfb7 (patch)
tree9b987397f34f685edbb4b1f282a32d229c15a1bd /drivers/usb/musb/musb_virthub.c
parente6d49d093e1076df060c18d28b8ebc36077f76e7 (diff)
parentd8c3ef256f88b7c6ecd673d03073b5645be9c5e4 (diff)
Merge tag 'musb-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
usb: musb: patches for v3.7 merge window Here we have a bunch of miscellaneous cleanups and fixes to the musb driver. It fixes a bunch of mistakes errors which nobody has triggered before, so I'm not Ccing stable tree. We are finally improving OMAP's VBUS/ID Mailbox usage so that we can introduce our PHY drivers properly. Also, we're adding support for multiple instances of the MUSB IP in the same SoC, as seen on some platforms from TI which have 2 MUSB instances. Other than that, we have some small fixes like not kicking DMA for a zero byte transfer, or properly handling NAK timeout on MUSB's host side, and the enabling of DMA Mode1 for any transfers which are aligned to wMaxPacketSize. All patches have been pending on mailing list for a long time and I don't expect any big surprises with this pull request.
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
-rw-r--r--drivers/usb/musb/musb_virthub.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 22ec3e37998..f70579154de 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -81,8 +81,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
switch (musb->xceiv->state) {
case OTG_STATE_A_HOST:
musb->xceiv->state = OTG_STATE_A_SUSPEND;
- musb->is_active = is_otg_enabled(musb)
- && otg->host->b_hnp_enable;
+ musb->is_active = otg->host->b_hnp_enable;
if (musb->is_active)
mod_timer(&musb->otg_timer, jiffies
+ msecs_to_jiffies(
@@ -91,8 +90,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
break;
case OTG_STATE_B_HOST:
musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
- musb->is_active = is_otg_enabled(musb)
- && otg->host->b_hnp_enable;
+ musb->is_active = otg->host->b_hnp_enable;
musb_platform_try_idle(musb, 0);
break;
default:
@@ -190,8 +188,7 @@ void musb_root_disconnect(struct musb *musb)
switch (musb->xceiv->state) {
case OTG_STATE_A_SUSPEND:
- if (is_otg_enabled(musb)
- && otg->host->b_hnp_enable) {
+ if (otg->host->b_hnp_enable) {
musb->xceiv->state = OTG_STATE_A_PERIPHERAL;
musb->g.is_a_peripheral = 1;
break;
@@ -273,7 +270,7 @@ int musb_hub_control(
musb_port_suspend(musb, false);
break;
case USB_PORT_FEAT_POWER:
- if (!(is_otg_enabled(musb) && hcd->self.is_b_host))
+ if (!hcd->self.is_b_host)
musb_platform_set_vbus(musb, 0);
break;
case USB_PORT_FEAT_C_CONNECTION:
@@ -369,7 +366,7 @@ int musb_hub_control(
* initialization logic, e.g. for OTG, or change any
* logic relating to VBUS power-up.
*/
- if (!(is_otg_enabled(musb) && hcd->self.is_b_host))
+ if (!hcd->self.is_b_host)
musb_start(musb);
break;
case USB_PORT_FEAT_RESET: