]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge current mainline tree into linux-omap tree
authorTony Lindgren <tony@atomide.com>
Tue, 11 Mar 2008 15:08:41 +0000 (17:08 +0200)
committerTony Lindgren <tony@atomide.com>
Tue, 11 Mar 2008 15:08:41 +0000 (17:08 +0200)
Merge branches 'master' and 'linus'

1  2 
Makefile
drivers/usb/gadget/Kconfig
drivers/usb/host/ehci-hcd.c

diff --combined Makefile
index a613e2a80a619073bb67818dbfc6dd92481ea456,0eb23e5bfc88cd30d6abec5c01d8f473a72a595a..c909f6f13add23fb3cf515cc2c441eba73cf3fbf
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 25
- EXTRAVERSION = -rc4
+ EXTRAVERSION = -rc5
  NAME = Funky Weasel is Jiggy wit it
  
  # *DOCUMENTATION*
@@@ -16,9 -16,6 +16,9 @@@
  # o  print "Entering directory ...";
  MAKEFLAGS += -rR --no-print-directory
  
 +# Add custom flags here to avoid conflict with updates
 +EXTRAVERSION := $(EXTRAVERSION)-omap1
 +
  # We are using a recursive build, so we need to do a little thinking
  # to get the ordering right.
  #
@@@ -174,8 -171,6 +174,8 @@@ SUBARCH := $(shell uname -m | sed -e s/
                                  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
                                  -e s/sh.*/sh/ )
  
 +SUBARCH := arm
 +
  # Cross compiling and selecting different set of gcc/bin-utils
  # ---------------------------------------------------------------------------
  #
  # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
  
  ARCH          ?= $(SUBARCH)
 -CROSS_COMPILE ?=
 +CROSS_COMPILE ?= arm-linux-
  
  # Architecture as present in compile.h
  UTS_MACHINE   := $(ARCH)
index 1ceb5e39b8a535179b7f96dae91fcce4bddf0f3d,6f45dd669b3378a3f4bd0c9970fe65fdcdae6cbb..b5911799ef35c1c21816f6c59be9c262dc87ee82
@@@ -131,7 -131,7 +131,7 @@@ config USB_ATMEL_USB
  
  config USB_GADGET_FSL_USB2
        boolean "Freescale Highspeed USB DR Peripheral Controller"
-       depends on MPC834x || PPC_MPC831x
+       depends on FSL_SOC
        select USB_GADGET_DUALSPEED
        help
           Some of Freescale PowerPC processors have a High Speed
@@@ -264,20 -264,10 +264,20 @@@ config USB_LH7A40
        default USB_GADGET
        select USB_GADGET_SELECTED
  
 +# built in ../musb along with host support
 +config USB_GADGET_MUSB_HDRC
 +      boolean "Inventra HDRC USB Peripheral (TI, ...)"
 +      depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
 +      select USB_GADGET_DUALSPEED
 +      select USB_GADGET_SELECTED
 +      help
 +        This OTG-capable silicon IP is used in dual designs including
 +        the TI DaVinci, OMAP 243x, OMAP 343x, and TUSB 6010.
 +
  config USB_GADGET_OMAP
        boolean "OMAP USB Device Controller"
        depends on ARCH_OMAP
 -      select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
 +      select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
        help
           Many Texas Instruments OMAP processors have flexible full
           speed USB device controllers, with support for up to 30
index 618d36800f0f5833f4385c026b5f1e53c56ae05d,46ee7f4c091232f54c16de95e241e5a160ea5e67..7a81caa021289e5536f831c4774c26272f1a8da4
@@@ -281,23 -281,44 +281,44 @@@ static void ehci_iaa_watchdog(unsigned 
  {
        struct ehci_hcd         *ehci = (struct ehci_hcd *) param;
        unsigned long           flags;
-       u32                     status, cmd;
  
        spin_lock_irqsave (&ehci->lock, flags);
-       WARN_ON(!ehci->reclaim);
  
-       status = ehci_readl(ehci, &ehci->regs->status);
-       cmd = ehci_readl(ehci, &ehci->regs->command);
-       ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd);
-       /* lost IAA irqs wedge things badly; seen first with a vt8235 */
-       if (ehci->reclaim) {
-               if (status & STS_IAA) {
-                       ehci_vdbg (ehci, "lost IAA\n");
+       /* Lost IAA irqs wedge things badly; seen first with a vt8235.
+        * So we need this watchdog, but must protect it against both
+        * (a) SMP races against real IAA firing and retriggering, and
+        * (b) clean HC shutdown, when IAA watchdog was pending.
+        */
+       if (ehci->reclaim
+                       && !timer_pending(&ehci->iaa_watchdog)
+                       && HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) {
+               u32 cmd, status;
+               /* If we get here, IAA is *REALLY* late.  It's barely
+                * conceivable that the system is so busy that CMD_IAAD
+                * is still legitimately set, so let's be sure it's
+                * clear before we read STS_IAA.  (The HC should clear
+                * CMD_IAAD when it sets STS_IAA.)
+                */
+               cmd = ehci_readl(ehci, &ehci->regs->command);
+               if (cmd & CMD_IAAD)
+                       ehci_writel(ehci, cmd & ~CMD_IAAD,
+                                       &ehci->regs->command);
+               /* If IAA is set here it either legitimately triggered
+                * before we cleared IAAD above (but _way_ late, so we'll
+                * still count it as lost) ... or a silicon erratum:
+                * - VIA seems to set IAA without triggering the IRQ;
+                * - IAAD potentially cleared without setting IAA.
+                */
+               status = ehci_readl(ehci, &ehci->regs->status);
+               if ((status & STS_IAA) || !(cmd & CMD_IAAD)) {
                        COUNT (ehci->stats.lost_iaa);
                        ehci_writel(ehci, STS_IAA, &ehci->regs->status);
                }
-               ehci_writel(ehci, cmd & ~CMD_IAAD, &ehci->regs->command);
+               ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n",
+                               status, cmd);
                end_unlink_async(ehci);
        }
  
@@@ -631,7 -652,7 +652,7 @@@ static int ehci_run (struct usb_hcd *hc
  static irqreturn_t ehci_irq (struct usb_hcd *hcd)
  {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
-       u32                     status, pcd_status = 0;
+       u32                     status, pcd_status = 0, cmd;
        int                     bh;
  
        spin_lock (&ehci->lock);
  
        /* clear (just) interrupts */
        ehci_writel(ehci, status, &ehci->regs->status);
-       ehci_readl(ehci, &ehci->regs->command); /* unblock posted write */
+       cmd = ehci_readl(ehci, &ehci->regs->command);
        bh = 0;
  
  #ifdef        EHCI_VERBOSE_DEBUG
  
        /* complete the unlinking of some qh [4.15.2.3] */
        if (status & STS_IAA) {
-               COUNT (ehci->stats.reclaim);
-               end_unlink_async(ehci);
+               /* guard against (alleged) silicon errata */
+               if (cmd & CMD_IAAD) {
+                       ehci_writel(ehci, cmd & ~CMD_IAAD,
+                                       &ehci->regs->command);
+                       ehci_dbg(ehci, "IAA with IAAD still set?\n");
+               }
+               if (ehci->reclaim) {
+                       COUNT(ehci->stats.reclaim);
+                       end_unlink_async(ehci);
+               } else
+                       ehci_dbg(ehci, "IAA with nothing to reclaim?\n");
        }
  
        /* remote wakeup [4.3.1] */
@@@ -781,7 -811,7 +811,7 @@@ static int ehci_urb_enqueue 
  static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
  {
        /* failfast */
-       if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))
+       if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) && ehci->reclaim)
                end_unlink_async(ehci);
  
        /* if it's not linked then there's nothing to do */
@@@ -988,11 -1018,6 +1018,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