summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-02-01 11:05:30 +0800
committerPeter Chen <peter.chen@freescale.com>2013-02-01 11:11:10 +0800
commit2890c34e82abd5dcc4f83514ae8a607a0de517ab (patch)
tree0484301da56f37f76755962586ac72379a7d02d0 /drivers
parent4e7d744abff6f2076f2c15d0c69cf591e499a22a (diff)
ENGR00242788: usb: host: disable stream mode due to IC problem
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>
Diffstat (limited to 'drivers')
-rwxr-xr-xdrivers/usb/host/ehci-arc.c15
-rwxr-xr-xdrivers/usb/host/ehci-fsl.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 8c703b9a33d4..4a2768a65c2c 100755
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -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;
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
index 137c5053ed35..b0b0d1701c7c 100755
--- a/drivers/usb/host/ehci-fsl.h
+++ b/drivers/usb/host/ehci-fsl.h
@@ -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)