mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 16:07:39 +00:00
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>
This commit is contained in:
parent
553fbcde34
commit
a51ea8cc9c
1 changed files with 11 additions and 8 deletions
|
@ -88,15 +88,18 @@ int fsl_udc_clk_init(struct platform_device *pdev)
|
|||
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;
|
||||
#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));
|
||||
/* 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue