Re: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread gre...@linuxfoundation.org
On Fri, Jan 10, 2014 at 10:25:54AM +, David Laight wrote: From: Peter Chen ... +#ifdef +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) +{ + __asm__ (swp %0, %0, [%1] : : r(val), r(addr)); +} +#else +static inline void imx28_ci_writel(u32 val,

RE: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread David Laight
From: gre...@linuxfoundation.org ... +#ifdef +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) +{ + __asm__ (swp %0, %0, [%1] : : r(val), r(addr)); +} +#else +static inline void imx28_ci_writel(u32 val, volatile void __iomem *addr) +{ +}

Re: [PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-10 Thread 'gre...@linuxfoundation.org'
On Fri, Jan 10, 2014 at 03:09:03PM +, David Laight wrote: This code ought to be defensive against 'imx28_write_fix' being set when the kernel isn't compiled with CONFIG_SOC_IMX28. This can easily be done by changing the #else block to do an iowrite(). You missed the long email

[PATCH 2/7] usb: chipidea: add freescale imx28 special write register method

2014-01-09 Thread Peter Chen
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 special hw_write and hw_test_and_clear for imx28. Discussion for it at below: