aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index e9e60b6e0583..c5d4c44d0ffa 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -76,7 +76,7 @@ static void musb_do_idle(unsigned long _musb)
76 if (musb->port1_status & MUSB_PORT_STAT_RESUME) { 76 if (musb->port1_status & MUSB_PORT_STAT_RESUME) {
77 power = musb_readb(musb->mregs, MUSB_POWER); 77 power = musb_readb(musb->mregs, MUSB_POWER);
78 power &= ~MUSB_POWER_RESUME; 78 power &= ~MUSB_POWER_RESUME;
79 DBG(1, "root port resume stopped, power %02x\n", power); 79 dev_dbg(musb->controller, "root port resume stopped, power %02x\n", power);
80 musb_writeb(musb->mregs, MUSB_POWER, power); 80 musb_writeb(musb->mregs, MUSB_POWER, power);
81 musb->is_active = 1; 81 musb->is_active = 1;
82 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND 82 musb->port1_status &= ~(USB_PORT_STAT_SUSPEND
@@ -114,7 +114,8 @@ static void omap2430_musb_try_idle(struct musb *musb, unsigned long timeout)
114 /* Never idle if active, or when VBUS timeout is not set as host */ 114 /* Never idle if active, or when VBUS timeout is not set as host */
115 if (musb->is_active || ((musb->a_wait_bcon == 0) 115 if (musb->is_active || ((musb->a_wait_bcon == 0)
116 && (musb->xceiv->state == OTG_STATE_A_WAIT_BCON))) { 116 && (musb->xceiv->state == OTG_STATE_A_WAIT_BCON))) {
117 DBG(4, "%s active, deleting timer\n", otg_state_string(musb)); 117 dev_dbg(musb->controller, "%s active, deleting timer\n",
118 otg_state_string(musb->xceiv->state));
118 del_timer(&musb_idle_timer); 119 del_timer(&musb_idle_timer);
119 last_timer = jiffies; 120 last_timer = jiffies;
120 return; 121 return;
@@ -124,14 +125,14 @@ static void omap2430_musb_try_idle(struct musb *musb, unsigned long timeout)
124 if (!timer_pending(&musb_idle_timer)) 125 if (!timer_pending(&musb_idle_timer))
125 last_timer = timeout; 126 last_timer = timeout;
126 else { 127 else {
127 DBG(4, "Longer idle timer already pending, ignoring\n"); 128 dev_dbg(musb->controller, "Longer idle timer already pending, ignoring\n");
128 return; 129 return;
129 } 130 }
130 } 131 }
131 last_timer = timeout; 132 last_timer = timeout;
132 133
133 DBG(4, "%s inactive, for idle timer for %lu ms\n", 134 dev_dbg(musb->controller, "%s inactive, for idle timer for %lu ms\n",
134 otg_state_string(musb), 135 otg_state_string(musb->xceiv->state),
135 (unsigned long)jiffies_to_msecs(timeout - jiffies)); 136 (unsigned long)jiffies_to_msecs(timeout - jiffies));
136 mod_timer(&musb_idle_timer, timeout); 137 mod_timer(&musb_idle_timer, timeout);
137} 138}
@@ -193,9 +194,9 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
193 } 194 }
194 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); 195 musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
195 196
196 DBG(1, "VBUS %s, devctl %02x " 197 dev_dbg(musb->controller, "VBUS %s, devctl %02x "
197 /* otg %3x conf %08x prcm %08x */ "\n", 198 /* otg %3x conf %08x prcm %08x */ "\n",
198 otg_state_string(musb), 199 otg_state_string(musb->xceiv->state),
199 musb_readb(musb->mregs, MUSB_DEVCTL)); 200 musb_readb(musb->mregs, MUSB_DEVCTL));
200} 201}
201 202
@@ -239,7 +240,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
239 240
240 switch (event) { 241 switch (event) {
241 case USB_EVENT_ID: 242 case USB_EVENT_ID:
242 DBG(4, "ID GND\n"); 243 dev_dbg(musb->controller, "ID GND\n");
243 244
244 if (is_otg_enabled(musb)) { 245 if (is_otg_enabled(musb)) {
245#ifdef CONFIG_USB_GADGET_MUSB_HDRC 246#ifdef CONFIG_USB_GADGET_MUSB_HDRC
@@ -257,7 +258,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
257 break; 258 break;
258 259
259 case USB_EVENT_VBUS: 260 case USB_EVENT_VBUS:
260 DBG(4, "VBUS Connect\n"); 261 dev_dbg(musb->controller, "VBUS Connect\n");
261 262
262#ifdef CONFIG_USB_GADGET_MUSB_HDRC 263#ifdef CONFIG_USB_GADGET_MUSB_HDRC
263 if (musb->gadget_driver) 264 if (musb->gadget_driver)
@@ -267,7 +268,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
267 break; 268 break;
268 269
269 case USB_EVENT_NONE: 270 case USB_EVENT_NONE:
270 DBG(4, "VBUS Disconnect\n"); 271 dev_dbg(musb->controller, "VBUS Disconnect\n");
271 272
272#ifdef CONFIG_USB_GADGET_MUSB_HDRC 273#ifdef CONFIG_USB_GADGET_MUSB_HDRC
273 if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) 274 if (is_otg_enabled(musb) || is_peripheral_enabled(musb))
@@ -285,7 +286,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
285 otg_shutdown(musb->xceiv); 286 otg_shutdown(musb->xceiv);
286 break; 287 break;
287 default: 288 default:
288 DBG(4, "ID float\n"); 289 dev_dbg(musb->controller, "ID float\n");
289 return NOTIFY_DONE; 290 return NOTIFY_DONE;
290 } 291 }
291 292
@@ -339,7 +340,7 @@ static int omap2430_musb_init(struct musb *musb)
339 status = otg_register_notifier(musb->xceiv, &musb->nb); 340 status = otg_register_notifier(musb->xceiv, &musb->nb);
340 341
341 if (status) 342 if (status)
342 DBG(1, "notification register failed\n"); 343 dev_dbg(musb->controller, "notification register failed\n");
343 344
344 setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb); 345 setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
345 346