From: Peter Chen Date: Thu, 10 Nov 2011 02:45:23 +0000 (+0800) Subject: ENGR00161848 mx5x: usb: fix build error X-Git-Tag: v3.0.35-fsl~1917 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2cc7e7fef6743d2531c3058d7eaebf244259bcaa;p=karo-tx-linux.git ENGR00161848 mx5x: usb: fix build error Fix the build error for mx5x arch/arm/plat-mxc/usb_common.c: In function 'fsl_usb_host_init': arch/arm/plat-mxc/usb_common.c:526: error: 'UCTRL_OVER_CUR_POL' undeclared (first use in this function) arch/arm/plat-mxc/usb_common.c:526: error: (Each undeclared identifier is reported only once arch/arm/plat-mxc/usb_common.c:526: error: for each function it appears in.) arch/arm/plat-mxc/usb_common.c:529: error: 'UCTRL_OVER_CUR_DIS' undeclared (first use in this function) arch/arm/plat-mxc/usb_common.c: In function 'usbotg_init': arch/arm/plat-mxc/usb_common.c:840: error: 'UCTRL_OVER_CUR_POL' undeclared (first use in this function) arch/arm/plat-mxc/usb_common.c:843: error: 'UCTRL_OVER_CUR_DIS' undeclared (first use in this function) make[1]: *** [arch/arm/plat-mxc/usb_common.o] Error 1 make: *** [arch/arm/plat-mxc] Error 2 Signed-off-by: Peter Chen --- diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c index 2c195d81ffb8..798aa9afeba5 100755 --- a/arch/arm/plat-mxc/usb_common.c +++ b/arch/arm/plat-mxc/usb_common.c @@ -521,6 +521,7 @@ int fsl_usb_host_init(struct platform_device *pdev) usbh1_set_utmi_xcvr(); } } else { +#ifdef CONFIG_ARCH_MX6 if (!strcmp("Host 1", pdata->name)) { if (machine_is_mx6q_arm2()) USB_H1_CTRL &= ~UCTRL_OVER_CUR_POL; @@ -528,6 +529,7 @@ int fsl_usb_host_init(struct platform_device *pdev) USB_H1_CTRL |= UCTRL_OVER_CUR_POL; USB_H1_CTRL |= UCTRL_OVER_CUR_DIS; } +#endif } pr_debug("%s: %s success\n", __func__, pdata->name); @@ -836,11 +838,13 @@ int usbotg_init(struct platform_device *pdev) otg_set_utmi_xcvr(); } } else { +#ifdef CONFIG_ARCH_MX6 if (machine_is_mx6q_arm2()) USB_OTG_CTRL &= ~UCTRL_OVER_CUR_POL; else if (machine_is_mx6q_sabrelite()) USB_OTG_CTRL |= UCTRL_OVER_CUR_POL; USB_OTG_CTRL |= UCTRL_OVER_CUR_DIS; +#endif } }