]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
OMAP34xx USB: EHCI: fix CRC errors
authorPandita, Vikram <vikram.pandita@ti.com>
Fri, 29 Feb 2008 10:18:57 +0000 (15:48 +0530)
committerTony Lindgren <tony@atomide.com>
Fri, 29 Feb 2008 16:07:20 +0000 (08:07 -0800)
Fix OMAP34xx EHCI OUT transfer CRC errors. The issue was observed because
the burst DMA access was not enabled resulting in data under-run condition
on OUT transfers.

The side effect of this was CRC errors on OUT transfers with complemented CRC
and multiple retries of each OUT transfer, before success.

Also minor fix to change the Copyright header in OMAP34xx EHCI files

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/host/ehci-omap.c
drivers/usb/host/ehci-omap.h

index 24781263b28d6fed6ece82ae23489eb3cfe3b0f7..50f2e21fe84290b7154965e7477e315b3fc4bc2e 100644 (file)
@@ -5,9 +5,9 @@
  * Tested on OMAP3430 ES2.0 SDP
  *
  * Copyright (C) 2007-2008 Texas Instruments, Inc.
- * Copyright (C) 2007-2008 Vikram Pandita <vikram.pandita@ti.com>
- * Based on "ehci-fsl.c" by David Brownell and
- *         "ehci-au1xxx.c" by K.Boge <karsten.boge@amd.com>
+ *     Author: Vikram Pandita <vikram.pandita@ti.com>
+ *
+ * Based on "ehci-fsl.c" and "ehci-au1xxx.c" ehci glue layers
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -88,7 +88,11 @@ static void omap_usb_utmi_init(struct usb_hcd *hcd, u8 tll_channel_mask)
        int i;
 
        /* Use UTMI Ports of TLL */
-       omap_writel((1 << OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT),
+       omap_writel((1 << OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN_SHIFT)|
+                       (0<<OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN_SHIFT),
                                                OMAP_UHH_HOSTCONFIG);
        /* Enusre bit is set */
        while (!(omap_readl(OMAP_UHH_HOSTCONFIG) &
@@ -275,7 +279,11 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
 
 #ifdef CONFIG_OMAP_EHCI_PHY_MODE
        /* Bypass the TLL module for PHY mode operation */
-       omap_writel((0 << OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT),
+       omap_writel((0 << OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN_SHIFT)|
+                       (1<<OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN_SHIFT)|
+                       (0<<OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN_SHIFT),
                                                OMAP_UHH_HOSTCONFIG);
        /* Ensure that BYPASS is set */
        while (omap_readl(OMAP_UHH_HOSTCONFIG) &
index 2e29da1e96a0ebaf7f3c5739201f41948cc13de1..86cd962404933b08fcd4fc67eff93429ce93c736 100644 (file)
@@ -2,7 +2,7 @@
  * ehci-omap.h - register definitions for USBHOST in OMAP 34xx
  *
  * Copyright (C) 2007-2008 Texas Instruments, Inc.
- * Copyright (C) 2007-2008 Vikram Pandita <vikram.pandita@ti.com>
+ *     Author: Vikram Pandita <vikram.pandita@ti.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #define        OMAP_UHH_SYSSTATUS      (OMAP_USBHOST_UHH_BASE + 0x14)
 #define        OMAP_UHH_HOSTCONFIG     (OMAP_USBHOST_UHH_BASE + 0x40)
        #define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS_SHIFT   0
+       #define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN_SHIFT        2
+       #define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN_SHIFT        3
+       #define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN_SHIFT       4
+       #define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN_SHIFT        5
 
 #define        OMAP_UHH_DEBUG_CSR      (OMAP_USBHOST_UHH_BASE + 0x44)