diff options
Diffstat (limited to 'drivers/usb/musb/am35x.c')
-rw-r--r-- | drivers/usb/musb/am35x.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index d5a3da37c90c..23ac28f98d91 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c | |||
@@ -151,7 +151,8 @@ static void otg_timer(unsigned long _musb) | |||
151 | * status change events (from the transceiver) otherwise. | 151 | * status change events (from the transceiver) otherwise. |
152 | */ | 152 | */ |
153 | devctl = musb_readb(mregs, MUSB_DEVCTL); | 153 | devctl = musb_readb(mregs, MUSB_DEVCTL); |
154 | DBG(7, "Poll devctl %02x (%s)\n", devctl, otg_state_string(musb)); | 154 | dev_dbg(musb->controller, "Poll devctl %02x (%s)\n", devctl, |
155 | otg_state_string(musb->xceiv->state)); | ||
155 | 156 | ||
156 | spin_lock_irqsave(&musb->lock, flags); | 157 | spin_lock_irqsave(&musb->lock, flags); |
157 | switch (musb->xceiv->state) { | 158 | switch (musb->xceiv->state) { |
@@ -202,20 +203,22 @@ static void am35x_musb_try_idle(struct musb *musb, unsigned long timeout) | |||
202 | /* Never idle if active, or when VBUS timeout is not set as host */ | 203 | /* Never idle if active, or when VBUS timeout is not set as host */ |
203 | if (musb->is_active || (musb->a_wait_bcon == 0 && | 204 | if (musb->is_active || (musb->a_wait_bcon == 0 && |
204 | musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) { | 205 | musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) { |
205 | DBG(4, "%s active, deleting timer\n", otg_state_string(musb)); | 206 | dev_dbg(musb->controller, "%s active, deleting timer\n", |
207 | otg_state_string(musb->xceiv->state)); | ||
206 | del_timer(&otg_workaround); | 208 | del_timer(&otg_workaround); |
207 | last_timer = jiffies; | 209 | last_timer = jiffies; |
208 | return; | 210 | return; |
209 | } | 211 | } |
210 | 212 | ||
211 | if (time_after(last_timer, timeout) && timer_pending(&otg_workaround)) { | 213 | if (time_after(last_timer, timeout) && timer_pending(&otg_workaround)) { |
212 | DBG(4, "Longer idle timer already pending, ignoring...\n"); | 214 | dev_dbg(musb->controller, "Longer idle timer already pending, ignoring...\n"); |
213 | return; | 215 | return; |
214 | } | 216 | } |
215 | last_timer = timeout; | 217 | last_timer = timeout; |
216 | 218 | ||
217 | DBG(4, "%s inactive, starting idle timer for %u ms\n", | 219 | dev_dbg(musb->controller, "%s inactive, starting idle timer for %u ms\n", |
218 | otg_state_string(musb), jiffies_to_msecs(timeout - jiffies)); | 220 | otg_state_string(musb->xceiv->state), |
221 | jiffies_to_msecs(timeout - jiffies)); | ||
219 | mod_timer(&otg_workaround, timeout); | 222 | mod_timer(&otg_workaround, timeout); |
220 | } | 223 | } |
221 | 224 | ||
@@ -302,9 +305,9 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci) | |||
302 | } | 305 | } |
303 | 306 | ||
304 | /* NOTE: this must complete power-on within 100 ms. */ | 307 | /* NOTE: this must complete power-on within 100 ms. */ |
305 | DBG(2, "VBUS %s (%s)%s, devctl %02x\n", | 308 | dev_dbg(musb->controller, "VBUS %s (%s)%s, devctl %02x\n", |
306 | drvvbus ? "on" : "off", | 309 | drvvbus ? "on" : "off", |
307 | otg_state_string(musb), | 310 | otg_state_string(musb->xceiv->state), |
308 | err ? " ERROR" : "", | 311 | err ? " ERROR" : "", |
309 | devctl); | 312 | devctl); |
310 | ret = IRQ_HANDLED; | 313 | ret = IRQ_HANDLED; |