linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eric@eukrea.com (Eric Bénard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time
Date: Wed, 19 Jan 2011 21:41:57 +0100	[thread overview]
Message-ID: <4D374C95.7020204@eukrea.com> (raw)
In-Reply-To: <1295468223-11371-1-git-send-email-fabio.estevam@freescale.com>

On 19/01/2011 21:17, Fabio Estevam wrote:
> Make sure we are running on a MX35 processor.
>
> Signed-off-by: Fabio Estevam<fabio.estevam@freescale.com>
Acked-by: Eric B?nard <eric@eukrea.com>

> ---
>   drivers/usb/gadget/fsl_mxc_udc.c |   19 +++++++++++--------
>   1 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
> index 77b1eb5..c1a65cd 100644
> --- a/drivers/usb/gadget/fsl_mxc_udc.c
> +++ b/drivers/usb/gadget/fsl_mxc_udc.c
> @@ -89,14 +89,17 @@ void fsl_udc_clk_finalize(struct platform_device *pdev)
>   {
>   	struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
>   #if defined(CONFIG_ARCH_MX35)
> -	unsigned int v;
> -
> -	/* workaround ENGcm09152 for i.MX35 */
> -	if (pdata->workaround&  FLS_USB2_WORKAROUND_ENGCM09152) {
> -		v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
> -				USBPHYCTRL_OTGBASE_OFFSET));
> -		writel(v | USBPHYCTRL_EVDO, MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
> -				USBPHYCTRL_OTGBASE_OFFSET));
> +	if (cpu_is_mx35()) {
> +		unsigned int v;
> +
> +		/* workaround ENGcm09152 for i.MX35 */
> +		if (pdata->workaround&  FLS_USB2_WORKAROUND_ENGCM09152) {
> +			v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
> +					USBPHYCTRL_OTGBASE_OFFSET));
> +			writel(v | USBPHYCTRL_EVDO,
> +				MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
> +					USBPHYCTRL_OTGBASE_OFFSET));
> +		}
>   	}
>   #endif
>

  reply	other threads:[~2011-01-19 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 20:17 [PATCH v2] usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time Fabio Estevam
2011-01-19 20:41 ` Eric Bénard [this message]
2011-01-19 21:32 ` Uwe Kleine-König
2011-01-20  8:20   ` Uwe Kleine-König

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=4D374C95.7020204@eukrea.com \
    --to=eric@eukrea.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).