]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00258491-3 usb: fix clock unmatch problem after unload module
authorPeter Chen <peter.chen@freescale.com>
Tue, 16 Apr 2013 06:36:12 +0000 (14:36 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:00 +0000 (14:14 +0200)
Move clock disable from MSL to driver

Signed-off-by: Peter Chen <peter.chen@freescale.com>
drivers/usb/gadget/arcotg_udc.c
drivers/usb/host/ehci-arc.c

index c97eac3a6696be826d52664cdfc29902b18ef571..7429d4b13130e1de6af9f52d0acd5cf4355cd901 100755 (executable)
@@ -3269,6 +3269,8 @@ static int  fsl_udc_remove(struct platform_device *pdev)
        dr_wake_up_enable(udc_controller, false);
 
        dr_discharge_line(pdata, true);
+
+       dr_clk_gate(false);
        /* DR has been stopped in usb_gadget_unregister_driver() */
        remove_proc_file();
 
@@ -3303,9 +3305,9 @@ static int  fsl_udc_remove(struct platform_device *pdev)
        device_unregister(&udc_controller->gadget.dev);
        /* free udc --wait for the release() finished */
        wait_for_completion(&done);
+
        /*
-        * do platform specific un-initialization:
-        * release iomux pins, etc.
+        * do platform specific un-initialization
         */
        if (pdata->exit)
                pdata->exit(pdata->pdev);
index 4a63faefe83bd6e2f7968f2befd9d7d12cb89bb2..eaf4c047f0bef217fd770b2f9e53305126c74b31 100755 (executable)
@@ -372,9 +372,11 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
        if (pdata->xcvr_ops && pdata->xcvr_ops->set_vbus_power)
                pdata->xcvr_ops->set_vbus_power(pdata->xcvr_ops, pdata, 0);
 
+       if (pdata->usb_clock_for_pm)
+               pdata->usb_clock_for_pm(false);
+
        /*
-        * do platform specific un-initialization:
-        * release iomux pins clocks, etc.
+        * do platform specific un-initialization
         */
        if (pdata->exit && pdata->pdev)
                pdata->exit(pdata->pdev);