From: peter.chen@freescale.com (Peter Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/5] usb: ehci: add freescale imx28 special write register method
Date: Mon, 28 Oct 2013 16:24:37 +0800 [thread overview]
Message-ID: <20131028082436.GF31499@shlinux1.ap.freescale.net> (raw)
In-Reply-To: <1382680943-9258-1-git-send-email-peter.chen@freescale.com>
On Fri, Oct 25, 2013 at 02:02:19PM +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
>
Hi Greg, the last two DT patches are not needed at current time.
The first three are OK. Thanks.
Peter
> Signed-off-by: Peter Chen <peter.chen@freescale.com>
> ---
> drivers/usb/host/ehci.h | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
> index e8f41c5..535aa8b 100644
> --- a/drivers/usb/host/ehci.h
> +++ b/drivers/usb/host/ehci.h
> @@ -225,6 +225,7 @@ struct ehci_hcd { /* one per controller */
> 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)
> @@ -728,6 +729,13 @@ static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
> #endif
> }
>
> +#ifdef CONFIG_SOC_IMX28
> +static inline void imx28_ehci_writel(u32 val32, volatile u32 *addr)
> +{
> + __asm__ ("swp %0, %0, [%1]" : : "r"(val32), "r"(addr));
> +}
> +#endif
> +
> static inline void ehci_writel(const struct ehci_hcd *ehci,
> const unsigned int val, __u32 __iomem *regs)
> {
> @@ -735,6 +743,11 @@ static inline void ehci_writel(const struct ehci_hcd *ehci,
> ehci_big_endian_mmio(ehci) ?
> writel_be(val, regs) :
> writel(val, regs);
> +#elif defined(CONFIG_SOC_IMX28)
> + if (ehci->imx28_write_fix)
> + imx28_ehci_writel(val, regs);
> + else
> + writel(val, regs);
> #else
> writel(val, regs);
> #endif
> --
> 1.7.1
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Best Regards,
Peter Chen
prev parent reply other threads:[~2013-10-28 8:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 6:02 [PATCH v3 1/5] usb: ehci: add freescale imx28 special write register method Peter Chen
2013-10-25 6:02 ` [PATCH v3 2/5] usb: chipidea: " Peter Chen
2013-10-28 10:36 ` Hector Palacios
2013-10-28 10:47 ` Marek Vasut
2013-10-29 23:54 ` gregkh at linuxfoundation.org
2013-10-30 0:53 ` Peter Chen
2013-10-30 3:09 ` gregkh at linuxfoundation.org
2013-10-25 6:02 ` [PATCH v3 3/5] usb: chipidea: imx: set CI_HDRC_IMX28_WRITE_FIX for imx28 Peter Chen
2013-10-27 16:25 ` Marek Vasut
2013-10-28 2:03 ` Shawn Guo
2013-10-28 7:52 ` Marek Vasut
2013-10-25 6:02 ` [PATCH v3 4/5] usb: doc: chipidea: imx: add compatiable string for imx28 SoC Peter Chen
2013-10-27 16:26 ` Marek Vasut
2013-10-28 2:00 ` Peter Chen
2013-10-25 6:02 ` [PATCH v3 5/5] ARM: dts: imx28: changing usb compatible string as only "fsl, imx28-usb" Peter Chen
2013-10-25 8:23 ` [PATCH v3 5/5] ARM: dts: imx28: changing usb compatible string as only "fsl,imx28-usb" Shawn Guo
2013-10-25 8:14 ` Peter Chen
2013-10-25 8:46 ` Shawn Guo
2013-10-28 1:59 ` Peter Chen
2013-10-28 2:50 ` Shawn Guo
2013-10-28 8:24 ` Peter Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131028082436.GF31499@shlinux1.ap.freescale.net \
--to=peter.chen@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).