|
@@ -2780,10 +2780,11 @@ int musb_host_setup(struct musb *musb, int power_budget)
|
|
|
int ret;
|
|
|
struct usb_hcd *hcd = musb->hcd;
|
|
|
|
|
|
- MUSB_HST_MODE(musb);
|
|
|
- musb->xceiv->otg->default_a = 1;
|
|
|
- musb->xceiv->otg->state = OTG_STATE_A_IDLE;
|
|
|
-
|
|
|
+ if (musb->port_mode == MUSB_PORT_MODE_HOST) {
|
|
|
+ MUSB_HST_MODE(musb);
|
|
|
+ musb->xceiv->otg->default_a = 1;
|
|
|
+ musb->xceiv->otg->state = OTG_STATE_A_IDLE;
|
|
|
+ }
|
|
|
otg_set_host(musb->xceiv->otg, &hcd->self);
|
|
|
hcd->self.otg_port = 1;
|
|
|
musb->xceiv->otg->host = &hcd->self;
|