[PATCH] OMAP34xx USB: EHCI: fix CRC errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- 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@xxxxxx>
---
 drivers/usb/host/ehci-omap.c |   18 +++++++++++++-----
 drivers/usb/host/ehci-omap.h |    6 +++++-
 2 files changed, 18 insertions(+), 6 deletions(-)

Index: omap-submit/drivers/usb/host/ehci-omap.c
===================================================================
--- omap-submit.orig/drivers/usb/host/ehci-omap.c	2008-02-29 15:04:54.000000000 +0530
+++ omap-submit/drivers/usb/host/ehci-omap.c	2008-02-29 15:13:52.000000000 +0530
@@ -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@xxxxxx>
- * Based on "ehci-fsl.c" by David Brownell and
- * 	    "ehci-au1xxx.c" by K.Boge <karsten.boge@xxxxxxx>
+ * 	Author: Vikram Pandita <vikram.pandita@xxxxxx>
+ *
+ * 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 us
 	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 platfor
 
 #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: omap-submit/drivers/usb/host/ehci-omap.h
===================================================================
--- omap-submit.orig/drivers/usb/host/ehci-omap.h	2008-02-29 14:08:30.000000000 +0530
+++ omap-submit/drivers/usb/host/ehci-omap.h	2008-02-29 15:14:15.000000000 +0530
@@ -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@xxxxxx>
+ * 	Author: Vikram Pandita <vikram.pandita@xxxxxx>
  *
  * 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
@@ -102,6 +102,10 @@
 #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)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux