diff options
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index c410a7ff150b..d4aa779339f1 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -2119,7 +2119,15 @@ __acquires(musb->lock) | |||
2119 | /* Normal reset, as B-Device; | 2119 | /* Normal reset, as B-Device; |
2120 | * or else after HNP, as A-Device | 2120 | * or else after HNP, as A-Device |
2121 | */ | 2121 | */ |
2122 | if (devctl & MUSB_DEVCTL_BDEVICE) { | 2122 | if (!musb->g.is_otg) { |
2123 | /* USB device controllers that are not OTG compatible | ||
2124 | * may not have DEVCTL register in silicon. | ||
2125 | * In that case, do not rely on devctl for setting | ||
2126 | * peripheral mode. | ||
2127 | */ | ||
2128 | musb->xceiv->state = OTG_STATE_B_PERIPHERAL; | ||
2129 | musb->g.is_a_peripheral = 0; | ||
2130 | } else if (devctl & MUSB_DEVCTL_BDEVICE) { | ||
2123 | musb->xceiv->state = OTG_STATE_B_PERIPHERAL; | 2131 | musb->xceiv->state = OTG_STATE_B_PERIPHERAL; |
2124 | musb->g.is_a_peripheral = 0; | 2132 | musb->g.is_a_peripheral = 0; |
2125 | } else { | 2133 | } else { |