diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2011-01-20 13:51:52 -0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-04 11:42:52 -0800 |
commit | a51ea8cc9cfcfd719240455ff8f217b4f165d1d0 (patch) | |
tree | bebc039d9d58f1a76a00f666cf4c6da7ff818a68 /drivers/usb/gadget/fsl_mxc_udc.c | |
parent | 553fbcde3481c98a076c9744a59ad08dbc61c099 (diff) | |
download | linux-a51ea8cc9cfcfd719240455ff8f217b4f165d1d0.tar.bz2 |
usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time
Make sure we are running on a MX35 processor.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/fsl_mxc_udc.c')
-rw-r--r-- | drivers/usb/gadget/fsl_mxc_udc.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c index 77b1eb577029..43a49ecc1f36 100644 --- a/drivers/usb/gadget/fsl_mxc_udc.c +++ b/drivers/usb/gadget/fsl_mxc_udc.c @@ -88,15 +88,18 @@ eenahb: 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 defined(CONFIG_SOC_IMX35) + 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 |