]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00242788: usb: host: disable stream mode due to IC problem
authorPeter Chen <peter.chen@freescale.com>
Fri, 1 Feb 2013 03:05:30 +0000 (11:05 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:53 +0000 (08:35 +0200)
There is a bug at chipidea core, please see below synopsis problem title
and its number.
STAR 9000378958
Title: Non-Double Word Aligned Buffer Address Sometimes
Causes Host to Hang on OUT Retry

This problem will be showed when we use Ethernet device at host port, there
is an errata ERR006308 for it.

The workaround for this issue is to disable stream mode at register usbmode.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
drivers/usb/host/ehci-arc.c
drivers/usb/host/ehci-fsl.h

index 8c703b9a33d4d55b451eebba1896c7c95a1c91af..4a2768a65c2c2de150a78a69dd67049160105278 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2005 MontaVista Software
- * Copyright (C) 2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
  *
  * 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 the
@@ -408,11 +408,23 @@ static void fsl_setup_phy(struct ehci_hcd *ehci,
        ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);
 }
 
+static void ehci_fsl_stream_disable(struct ehci_hcd *ehci)
+{
+       u32 __iomem     *reg_ptr;
+       u32             tmp;
+
+       reg_ptr = (u32 __iomem *)(((u8 __iomem *)ehci->regs) + USBMODE);
+       tmp = ehci_readl(ehci, reg_ptr);
+       tmp |= CI_USBMODE_SDIS;
+       ehci_writel(ehci, tmp, reg_ptr);
+}
+
 /* called after powerup, by probe or system-pm "wakeup" */
 static int ehci_fsl_reinit(struct ehci_hcd *ehci)
 {
        fsl_platform_usb_setup(ehci);
        ehci_port_power(ehci, 0);
+       ehci_fsl_stream_disable(ehci);
 
        return 0;
 }
@@ -805,6 +817,7 @@ static int ehci_fsl_drv_resume(struct platform_device *pdev)
        ehci_writel(ehci, pdata->pm_configured_flag,
                    &ehci->regs->configured_flag);
 
+       ehci_fsl_stream_disable(ehci);
 
        tmp = ehci_readl(ehci, &ehci->regs->command);
        tmp |= CMD_RUN;
index 137c5053ed35f2b24abc70014f5eb072e4e3b667..b0b0d1701c7ca59fee60026245b29177047ce795 100755 (executable)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2011 Freescale Semiconductor, Inc.
+/* Copyright (C) 2005-2013 Freescale Semiconductor, Inc.
  * Copyright (c) 2005 MontaVista Software
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -36,6 +36,7 @@
 #define USBMODE_CM_MASK                (3 << 0)        /* controller mode mask */
 #define USBMODE_CM_HOST                (3 << 0)        /* controller mode: host */
 #define USBMODE_ES             (1 << 2)        /* (Big) Endian Select */
+#define CI_USBMODE_SDIS                (1 << 4)        /* Chipidea Stream Disable bit */
 
 #define FSL_SOC_USB_USBGENCTRL 0x200
 #define USBGENCTRL_PPP         (1 << 3)