summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/usb_common.c
diff options
context:
space:
mode:
authormake shi <b15407@freescale.com>2011-11-09 18:59:00 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:05:53 +0800
commit9cd07bb1bca3372d97dc97e82775e00e2a249899 (patch)
treeb4b6c9c37f4ecb94baf440a0eafc9f4f52353e93 /arch/arm/plat-mxc/usb_common.c
parent5bef6ba81ba759e682b386d4f293132c42520a82 (diff)
ENGR00161518 [MX6] USB: Add USB OC(Over Current) code
Add config USB OC setting code for mx6q, and make the OC default off. After adding it, fixing the loop less code during kernel boot in mx6qLite. Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/usb_common.c')
-rwxr-xr-xarch/arm/plat-mxc/usb_common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c
index 5ebbc6ef9b33..2c195d81ffb8 100755
--- a/arch/arm/plat-mxc/usb_common.c
+++ b/arch/arm/plat-mxc/usb_common.c
@@ -520,6 +520,14 @@ int fsl_usb_host_init(struct platform_device *pdev)
} else if (xops->xcvr_type == PORTSC_PTS_UTMI) {
usbh1_set_utmi_xcvr();
}
+ } else {
+ if (!strcmp("Host 1", pdata->name)) {
+ if (machine_is_mx6q_arm2())
+ USB_H1_CTRL &= ~UCTRL_OVER_CUR_POL;
+ else if (machine_is_mx6q_sabrelite())
+ USB_H1_CTRL |= UCTRL_OVER_CUR_POL;
+ USB_H1_CTRL |= UCTRL_OVER_CUR_DIS;
+ }
}
pr_debug("%s: %s success\n", __func__, pdata->name);
@@ -827,6 +835,12 @@ int usbotg_init(struct platform_device *pdev)
} else if (xops->xcvr_type == PORTSC_PTS_UTMI) {
otg_set_utmi_xcvr();
}
+ } else {
+ 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;
}
}