aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/ux500.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/ux500.c')
-rw-r--r--drivers/usb/musb/ux500.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index dc666e96f45f..abf72728825f 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -56,7 +56,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
56 devctl = musb_readb(musb->mregs, MUSB_DEVCTL); 56 devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
57 57
58 if (is_on) { 58 if (is_on) {
59 if (musb->xceiv->state == OTG_STATE_A_IDLE) { 59 if (musb->xceiv->otg->state == OTG_STATE_A_IDLE) {
60 /* start the session */ 60 /* start the session */
61 devctl |= MUSB_DEVCTL_SESSION; 61 devctl |= MUSB_DEVCTL_SESSION;
62 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); 62 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
@@ -76,7 +76,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
76 } else { 76 } else {
77 musb->is_active = 1; 77 musb->is_active = 1;
78 musb->xceiv->otg->default_a = 1; 78 musb->xceiv->otg->default_a = 1;
79 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; 79 musb->xceiv->otg->state = OTG_STATE_A_WAIT_VRISE;
80 devctl |= MUSB_DEVCTL_SESSION; 80 devctl |= MUSB_DEVCTL_SESSION;
81 MUSB_HST_MODE(musb); 81 MUSB_HST_MODE(musb);
82 } 82 }
@@ -102,7 +102,7 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)
102 mdelay(200); 102 mdelay(200);
103 103
104 dev_dbg(musb->controller, "VBUS %s, devctl %02x\n", 104 dev_dbg(musb->controller, "VBUS %s, devctl %02x\n",
105 usb_otg_state_string(musb->xceiv->state), 105 usb_otg_state_string(musb->xceiv->otg->state),
106 musb_readb(musb->mregs, MUSB_DEVCTL)); 106 musb_readb(musb->mregs, MUSB_DEVCTL));
107} 107}
108 108
@@ -112,7 +112,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
112 struct musb *musb = container_of(nb, struct musb, nb); 112 struct musb *musb = container_of(nb, struct musb, nb);
113 113
114 dev_dbg(musb->controller, "musb_otg_notifications %ld %s\n", 114 dev_dbg(musb->controller, "musb_otg_notifications %ld %s\n",
115 event, usb_otg_state_string(musb->xceiv->state)); 115 event, usb_otg_state_string(musb->xceiv->otg->state));
116 116
117 switch (event) { 117 switch (event) {
118 case UX500_MUSB_ID: 118 case UX500_MUSB_ID:
@@ -127,7 +127,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
127 if (is_host_active(musb)) 127 if (is_host_active(musb))
128 ux500_musb_set_vbus(musb, 0); 128 ux500_musb_set_vbus(musb, 0);
129 else 129 else
130 musb->xceiv->state = OTG_STATE_B_IDLE; 130 musb->xceiv->otg->state = OTG_STATE_B_IDLE;
131 break; 131 break;
132 default: 132 default:
133 dev_dbg(musb->controller, "ID float\n"); 133 dev_dbg(musb->controller, "ID float\n");
@@ -188,8 +188,10 @@ static int ux500_musb_exit(struct musb *musb)
188} 188}
189 189
190static const struct musb_platform_ops ux500_ops = { 190static const struct musb_platform_ops ux500_ops = {
191 .quirks = MUSB_INDEXED_EP,
191 .init = ux500_musb_init, 192 .init = ux500_musb_init,
192 .exit = ux500_musb_exit, 193 .exit = ux500_musb_exit,
194 .fifo_mode = 5,
193 195
194 .set_vbus = ux500_musb_set_vbus, 196 .set_vbus = ux500_musb_set_vbus,
195}; 197};
@@ -247,10 +249,8 @@ static int ux500_probe(struct platform_device *pdev)
247 } 249 }
248 250
249 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); 251 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
250 if (!glue) { 252 if (!glue)
251 dev_err(&pdev->dev, "failed to allocate glue context\n");
252 goto err0; 253 goto err0;
253 }
254 254
255 musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); 255 musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
256 if (!musb) { 256 if (!musb) {