]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00161848 mx5x: usb: fix build error
authorPeter Chen <peter.chen@freescale.com>
Thu, 10 Nov 2011 02:45:23 +0000 (10:45 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:26 +0000 (08:33 +0200)
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 <peter.chen@freescale.com>
arch/arm/plat-mxc/usb_common.c

index 2c195d81ffb80ce7f50ffaeaca3ca3aadff24fab..798aa9afeba5787e4648b35c3681e7b7ef7b684c 100755 (executable)
@@ -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
                }
        }