~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/usb/musb/am35x.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
         * status change events (from the transceiver) otherwise.
152
152
         */
153
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
157
        spin_lock_irqsave(&musb->lock, flags);
157
158
        switch (musb->xceiv->state) {
202
203
        /* Never idle if active, or when VBUS timeout is not set as host */
203
204
        if (musb->is_active || (musb->a_wait_bcon == 0 &&
204
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
208
                del_timer(&otg_workaround);
207
209
                last_timer = jiffies;
208
210
                return;
209
211
        }
210
212
 
211
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
215
                return;
214
216
        }
215
217
        last_timer = timeout;
216
218
 
217
 
        DBG(4, "%s inactive, starting idle timer for %u ms\n",
218
 
            otg_state_string(musb), jiffies_to_msecs(timeout - jiffies));
 
219
        dev_dbg(musb->controller, "%s inactive, starting idle timer for %u ms\n",
 
220
                otg_state_string(musb->xceiv->state),
 
221
                jiffies_to_msecs(timeout - jiffies));
219
222
        mod_timer(&otg_workaround, timeout);
220
223
}
221
224
 
302
305
                }
303
306
 
304
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
309
                                drvvbus ? "on" : "off",
307
 
                                otg_state_string(musb),
 
310
                                otg_state_string(musb->xceiv->state),
308
311
                                err ? " ERROR" : "",
309
312
                                devctl);
310
313
                ret = IRQ_HANDLED;