This is a note to let you know that I've just added the patch titled usb: ehci: add freescale imx28 special write register method to the 3.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-ehci-add-freescale-imx28-special-write-register-method.patch and it can be found in the queue-3.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From feffe09f510c475df082546815f9e4a573f6a233 Mon Sep 17 00:00:00 2001 From: Peter Chen <peter.chen@xxxxxxxxxxxxx> Date: Fri, 10 Jan 2014 13:51:26 +0800 Subject: usb: ehci: add freescale imx28 special write register method From: Peter Chen <peter.chen@xxxxxxxxxxxxx> commit feffe09f510c475df082546815f9e4a573f6a233 upstream. According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB register error issue", All USB register write operations must use the ARM SWP instruction. So, we implement a special ehci_write for imx28. Discussion for it at below: http://marc.info/?l=linux-usb&m=137996395529294&w=2 Without this patcheset, imx28 works unstable at high AHB bus loading. If the bus loading is not high, the imx28 usb can work well at the most of time. There is a IC errata for this problem, usually, we consider IC errata is a problem not a new feature, and this workaround is needed for that, so we need to add them to stable tree 3.11+. Cc: robert.hodaszi@xxxxxxxx Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx> Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Tested-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/host/ehci.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -203,6 +203,7 @@ struct ehci_hcd { /* one per controlle unsigned has_synopsys_hc_bug:1; /* Synopsys HC */ unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */ unsigned need_oc_pp_cycle:1; /* MPC834X port power */ + unsigned imx28_write_fix:1; /* For Freescale i.MX28 */ /* required for usb32 quirk */ #define OHCI_CTRL_HCFS (3 << 6) @@ -679,6 +680,18 @@ static inline unsigned int ehci_readl(co #endif } +#ifdef CONFIG_SOC_IMX28 +static inline void imx28_ehci_writel(const unsigned int val, + volatile __u32 __iomem *addr) +{ + __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr)); +} +#else +static inline void imx28_ehci_writel(const unsigned int val, + volatile __u32 __iomem *addr) +{ +} +#endif static inline void ehci_writel(const struct ehci_hcd *ehci, const unsigned int val, __u32 __iomem *regs) { @@ -687,7 +700,10 @@ static inline void ehci_writel(const str writel_be(val, regs) : writel(val, regs); #else - writel(val, regs); + if (ehci->imx28_write_fix) + imx28_ehci_writel(val, regs); + else + writel(val, regs); #endif } Patches currently in stable-queue which might be from peter.chen@xxxxxxxxxxxxx are queue-3.12/usb-chipidea-add-freescale-imx28-special-write-register-method.patch queue-3.12/usb-chipidea-need-to-mask-int_status-when-write-otgsc.patch queue-3.12/usb-chipidea-udc-using-multo-at-td-as-real-mult-value-for-iso-tx.patch queue-3.12/usb-chipidea-imx-set-ci_hdrc_imx28_write_fix-for-imx28.patch queue-3.12/usb-ehci-add-freescale-imx28-special-write-register-method.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html