Re: [PATCH 3/7] usb: ehci: add freescale imx28 special write register method
On 12/09/2013 03:04 AM, Greg KH wrote: > On Thu, Dec 05, 2013 at 03:20:51PM +0800, Peter Chen wrote: >> 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 >> >> Signed-off-by: Peter Chen >> Acked-by: Alan Stern >> Signed-off-by: Marc Kleine-Budde >> Tested-by: Marc Kleine-Budde >> --- >> drivers/usb/host/ehci.h | 18 +- >> 1 files changed, 17 insertions(+), 1 deletions(-) > > How is this a regression that needs to be fixed in 3.13-final? Yes, all three (3/7, 4/7, 5/7) should go into v3.13, add you please add stable on Cc as well. Thanks, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH 3/7] usb: ehci: add freescale imx28 special write register method
On Mon, Dec 09, 2013 at 08:37:55AM +, peter.c...@freescale.com wrote: > > > > > On Thu, Dec 05, 2013 at 03:20:51PM +0800, Peter Chen wrote: > > > 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 > > > > > > Signed-off-by: Peter Chen > > > Acked-by: Alan Stern > > > Signed-off-by: Marc Kleine-Budde > > > Tested-by: Marc Kleine-Budde > > > --- > > > drivers/usb/host/ehci.h | 18 +- > > > 1 files changed, 17 insertions(+), 1 deletions(-) > > > > How is this a regression that needs to be fixed in 3.13-final? > > > > Without this patchset, there is lots of usb errors at i.mx28. > It was reported at: http://marc.info/?l=linux-usb&m=137996395529294&w=2. > > This patchset includes [3/7], [4/7] and [5/7]. Thanks. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 3/7] usb: ehci: add freescale imx28 special write register method
> > On Thu, Dec 05, 2013 at 03:20:51PM +0800, Peter Chen wrote: > > 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 > > > > Signed-off-by: Peter Chen > > Acked-by: Alan Stern > > Signed-off-by: Marc Kleine-Budde > > Tested-by: Marc Kleine-Budde > > --- > > drivers/usb/host/ehci.h | 18 +- > > 1 files changed, 17 insertions(+), 1 deletions(-) > > How is this a regression that needs to be fixed in 3.13-final? > Without this patchset, there is lots of usb errors at i.mx28. It was reported at: http://marc.info/?l=linux-usb&m=137996395529294&w=2. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/7] usb: ehci: add freescale imx28 special write register method
On Thu, Dec 05, 2013 at 03:20:51PM +0800, Peter Chen wrote: > 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 > > Signed-off-by: Peter Chen > Acked-by: Alan Stern > Signed-off-by: Marc Kleine-Budde > Tested-by: Marc Kleine-Budde > --- > drivers/usb/host/ehci.h | 18 +- > 1 files changed, 17 insertions(+), 1 deletions(-) How is this a regression that needs to be fixed in 3.13-final? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] usb: ehci: add freescale imx28 special write register method
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 Signed-off-by: Peter Chen Acked-by: Alan Stern Signed-off-by: Marc Kleine-Budde Tested-by: Marc Kleine-Budde --- drivers/usb/host/ehci.h | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index e8f41c5..4a320ab 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -225,6 +225,7 @@ struct ehci_hcd { /* one per controller */ unsignedhas_synopsys_hc_bug:1; /* Synopsys HC */ unsignedframe_index_bug:1; /* MosChip (AKA NetMos) */ unsignedneed_oc_pp_cycle:1; /* MPC834X port power */ + unsignedimx28_write_fix:1; /* For Freescale i.MX28 */ /* required for usb32 quirk */ #define OHCI_CTRL_HCFS (3 << 6) @@ -728,6 +729,18 @@ static inline unsigned int ehci_readl(const struct ehci_hcd *ehci, #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) { @@ -736,7 +749,10 @@ static inline void ehci_writel(const struct ehci_hcd *ehci, writel_be(val, regs) : writel(val, regs); #else - writel(val, regs); + if (IS_ENABLED(CONFIG_SOC_IMX28) && ehci->imx28_write_fix) + imx28_ehci_writel(val, regs); + else + writel(val, regs); #endif } -- 1.7.8 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html