aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/otg/isp1301_omap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c
index 70cf5d7bca48..33cd709b084e 100644
--- a/drivers/usb/otg/isp1301_omap.c
+++ b/drivers/usb/otg/isp1301_omap.c
@@ -1336,9 +1336,6 @@ static int
1336isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) 1336isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
1337{ 1337{
1338 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy); 1338 struct isp1301 *isp = container_of(otg->phy, struct isp1301, phy);
1339#ifndef CONFIG_USB_OTG
1340 u32 l;
1341#endif
1342 1339
1343 if (!otg || isp != the_transceiver) 1340 if (!otg || isp != the_transceiver)
1344 return -ENODEV; 1341 return -ENODEV;
@@ -1365,10 +1362,14 @@ isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
1365 otg->gadget = gadget; 1362 otg->gadget = gadget;
1366 // FIXME update its refcount 1363 // FIXME update its refcount
1367 1364
1368 l = omap_readl(OTG_CTRL) & OTG_CTRL_MASK; 1365 {
1369 l &= ~(OTG_XCEIV_OUTPUTS|OTG_CTRL_BITS); 1366 u32 l;
1370 l |= OTG_ID; 1367
1371 omap_writel(l, OTG_CTRL); 1368 l = omap_readl(OTG_CTRL) & OTG_CTRL_MASK;
1369 l &= ~(OTG_XCEIV_OUTPUTS|OTG_CTRL_BITS);
1370 l |= OTG_ID;
1371 omap_writel(l, OTG_CTRL);
1372 }
1372 1373
1373 power_up(isp); 1374 power_up(isp);
1374 isp->phy.state = OTG_STATE_B_IDLE; 1375 isp->phy.state = OTG_STATE_B_IDLE;