|
@@ -2119,7 +2119,15 @@ __acquires(musb->lock)
|
|
|
/* Normal reset, as B-Device;
|
|
|
* or else after HNP, as A-Device
|
|
|
*/
|
|
|
- if (devctl & MUSB_DEVCTL_BDEVICE) {
|
|
|
+ if (!musb->g.is_otg) {
|
|
|
+ /* USB device controllers that are not OTG compatible
|
|
|
+ * may not have DEVCTL register in silicon.
|
|
|
+ * In that case, do not rely on devctl for setting
|
|
|
+ * peripheral mode.
|
|
|
+ */
|
|
|
+ musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
|
|
|
+ musb->g.is_a_peripheral = 0;
|
|
|
+ } else if (devctl & MUSB_DEVCTL_BDEVICE) {
|
|
|
musb->xceiv->state = OTG_STATE_B_PERIPHERAL;
|
|
|
musb->g.is_a_peripheral = 0;
|
|
|
} else {
|