summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-03-22 13:46:23 +0800
committerPeter Chen <peter.chen@freescale.com>2013-05-06 08:13:54 +0800
commitb720655be58b0849a34cc6c7112ebd8902bbc81f (patch)
tree58351966379d16c62f9c3af4c4dc16840d39fa1f
parenta070aad1adedd9bcece3254af11e96890ff41af8 (diff)
ENGR00255484-3 msl: usb: add clock deinit at fail pathrel_imx_3.0.35_2.1.0
If not, the clocks usage will be mismatch Signed-off-by: Peter Chen <peter.chen@freescale.com>
-rw-r--r--arch/arm/mach-mx6/usb_dr.c4
-rw-r--r--arch/arm/mach-mx6/usb_h1.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/usb_dr.c b/arch/arm/mach-mx6/usb_dr.c
index b7b0bee153c5..a84362255758 100644
--- a/arch/arm/mach-mx6/usb_dr.c
+++ b/arch/arm/mach-mx6/usb_dr.c
@@ -154,6 +154,10 @@ static int usbotg_init_ext(struct platform_device *pdev)
ret = usbotg_init(pdev);
if (ret) {
+ clk_disable(usb_oh3_clk);
+ clk_put(usb_oh3_clk);
+ clk_disable(usb_phy1_clk);
+ clk_put(usb_phy1_clk);
printk(KERN_ERR "otg init fails......\n");
return ret;
}
diff --git a/arch/arm/mach-mx6/usb_h1.c b/arch/arm/mach-mx6/usb_h1.c
index 96a333eafbb9..63a42c8ad8ec 100644
--- a/arch/arm/mach-mx6/usb_h1.c
+++ b/arch/arm/mach-mx6/usb_h1.c
@@ -158,6 +158,8 @@ static int fsl_usb_host_init_ext(struct platform_device *pdev)
ret = fsl_usb_host_init(pdev);
if (ret) {
printk(KERN_ERR "host1 init fails......\n");
+ clk_disable(usb_oh3_clk);
+ clk_put(usb_oh3_clk);
return ret;
}
usbh1_internal_phy_clock_gate(true);