Commit a51ea8cc authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

usb: gadget/fsl_mxc_udc: Detect the CPU type in run-time

Make sure we are running on a MX35 processor.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 553fbcde
...@@ -88,16 +88,19 @@ int fsl_udc_clk_init(struct platform_device *pdev) ...@@ -88,16 +88,19 @@ int fsl_udc_clk_init(struct platform_device *pdev)
void fsl_udc_clk_finalize(struct platform_device *pdev) void fsl_udc_clk_finalize(struct platform_device *pdev)
{ {
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
#if defined(CONFIG_ARCH_MX35) #if defined(CONFIG_SOC_IMX35)
if (cpu_is_mx35()) {
unsigned int v; unsigned int v;
/* workaround ENGcm09152 for i.MX35 */ /* workaround ENGcm09152 for i.MX35 */
if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) { if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) {
v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
USBPHYCTRL_OTGBASE_OFFSET)); USBPHYCTRL_OTGBASE_OFFSET));
writel(v | USBPHYCTRL_EVDO, MX35_IO_ADDRESS(MX35_USB_BASE_ADDR + writel(v | USBPHYCTRL_EVDO,
MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
USBPHYCTRL_OTGBASE_OFFSET)); USBPHYCTRL_OTGBASE_OFFSET));
} }
}
#endif #endif
/* ULPI transceivers don't need usbpll */ /* ULPI transceivers don't need usbpll */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment