aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2012-06-22 08:10:53 -0400
committerFelipe Balbi <balbi@ti.com>2012-06-25 07:08:42 -0400
commitc83a8542b5e3c5b30825955a68b1cc8bd24b122a (patch)
tree1cc3233f95af3c904defa6487d6f076bea0f9bdb /drivers/usb/musb
parentc9721438c009adf8e81d376839ed037c53b9b8d9 (diff)
usb: musb: move otg specific initializations from twl to glue
Moved otg specific state(OTG_STATE_B_IDLE, OTG_STATE_A_IDLE) initializations from twl to glue. These initializations are removed from twl4030 and twl6030 and moved to the mailbox API defined in glue. This is part of the cleanup in preparation to make use of usb2 phy driver. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/omap2430.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 063687085d1e..c4dc92bd7e85 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -249,11 +249,14 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
249 struct device *dev = musb->controller; 249 struct device *dev = musb->controller;
250 struct musb_hdrc_platform_data *pdata = dev->platform_data; 250 struct musb_hdrc_platform_data *pdata = dev->platform_data;
251 struct omap_musb_board_data *data = pdata->board_data; 251 struct omap_musb_board_data *data = pdata->board_data;
252 struct usb_otg *otg = musb->xceiv->otg;
252 253
253 switch (glue->status) { 254 switch (glue->status) {
254 case OMAP_MUSB_ID_GROUND: 255 case OMAP_MUSB_ID_GROUND:
255 dev_dbg(dev, "ID GND\n"); 256 dev_dbg(dev, "ID GND\n");
256 257
258 otg->default_a = true;
259 musb->xceiv->state = OTG_STATE_A_IDLE;
257 musb->xceiv->last_event = USB_EVENT_ID; 260 musb->xceiv->last_event = USB_EVENT_ID;
258 if (!is_otg_enabled(musb) || musb->gadget_driver) { 261 if (!is_otg_enabled(musb) || musb->gadget_driver) {
259 pm_runtime_get_sync(dev); 262 pm_runtime_get_sync(dev);
@@ -265,6 +268,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
265 case OMAP_MUSB_VBUS_VALID: 268 case OMAP_MUSB_VBUS_VALID:
266 dev_dbg(dev, "VBUS Connect\n"); 269 dev_dbg(dev, "VBUS Connect\n");
267 270
271 otg->default_a = false;
272 musb->xceiv->state = OTG_STATE_B_IDLE;
268 musb->xceiv->last_event = USB_EVENT_VBUS; 273 musb->xceiv->last_event = USB_EVENT_VBUS;
269 if (musb->gadget_driver) 274 if (musb->gadget_driver)
270 pm_runtime_get_sync(dev); 275 pm_runtime_get_sync(dev);