]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ehci-hcd.c
Merge branch 'omap-fixes'
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ehci-hcd.c
index e551bb38852be35eefeb532a23c260ecff6109ff..efca884e742b28f6619ce04817d71ddca2b574ec 100644 (file)
@@ -110,6 +110,42 @@ MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
 
 /*-------------------------------------------------------------------------*/
 
+static void
+timer_action(struct ehci_hcd *ehci, enum ehci_timer_action action)
+{
+       /* Don't override timeouts which shrink or (later) disable
+        * the async ring; just the I/O watchdog.  Note that if a
+        * SHRINK were pending, OFF would never be requested.
+        */
+       if (timer_pending(&ehci->watchdog)
+                       && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
+                               & ehci->actions))
+               return;
+
+       if (!test_and_set_bit(action, &ehci->actions)) {
+               unsigned long t;
+
+               switch (action) {
+               case TIMER_IO_WATCHDOG:
+                       t = EHCI_IO_JIFFIES;
+                       break;
+               case TIMER_ASYNC_OFF:
+                       t = EHCI_ASYNC_JIFFIES;
+                       break;
+               /* case TIMER_ASYNC_SHRINK: */
+               default:
+                       /* add a jiffie since we synch against the
+                        * 8 KHz uframe counter.
+                        */
+                       t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1;
+                       break;
+               }
+               mod_timer(&ehci->watchdog, t + jiffies);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+
 /*
  * handshake - spin reading hc until handshake completes or fails
  * @ptr: address of hc register to be read
@@ -586,7 +622,7 @@ static int ehci_run (struct usb_hcd *hcd)
                ehci_writel(ehci, 0, &ehci->regs->segment);
 #if 0
 // this is deeply broken on almost all architectures
-               if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK))
+               if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64)))
                        ehci_info(ehci, "enabled 64bit DMA\n");
 #endif
        }
@@ -1016,6 +1052,11 @@ MODULE_LICENSE ("GPL");
 #define        PLATFORM_DRIVER         ehci_hcd_au1xxx_driver
 #endif
 
+#ifdef CONFIG_ARCH_OMAP34XX
+#include "ehci-omap.c"
+#define        PLATFORM_DRIVER         ehci_hcd_omap_driver
+#endif
+
 #ifdef CONFIG_PPC_PS3
 #include "ehci-ps3.c"
 #define        PS3_SYSTEM_BUS_DRIVER   ps3_ehci_driver