]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00225131-05 MX6 USB: set stop_mode_config bit if wake up is enabled
authormake shi <b15407@freescale.com>
Thu, 20 Sep 2012 09:15:26 +0000 (17:15 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:27 +0000 (08:35 +0200)
IC designer had clarified that 1P1 can be turned off if we do not need support
remote wakeup. So If there is no requirement for USB remote wake up, the 1P1
can be turn off. USB driver will support dynamically turn on(off) 1P1 during
system suspend. 1P1 will be turn on depend on USB wakeup is enabled.

- Set stop_mode_config bit if USB host need support USB remote wake up
- Set stop_mode_config bit if USB device need support USB DP/DM wake
  up system

Signed-off-by: make shi <b15407@freescale.com>
drivers/usb/gadget/arcotg_udc.c
drivers/usb/host/ehci-arc.c

index 405dbcc05a8f9d8b981e4fb08bfaec29a407eab9..86518d9855ac944bab27f59d89523b6a8740d4f8 100755 (executable)
@@ -3323,10 +3323,13 @@ static int udc_suspend(struct fsl_udc *udc)
         * charge using usb
         */
        if (pdata->pmflags == 0) {
-               if (!udc_can_wakeup_system())
+               if (!udc_can_wakeup_system()) {
                        dr_wake_up_enable(udc, false);
-               else
+               } else {
+                       if (pdata->platform_phy_power_on)
+                               pdata->platform_phy_power_on();
                        dr_wake_up_enable(udc, true);
+               }
        }
 
        /*
index b872d94b3fc38303bf95a48d488635bf613cd7b4..e09f4dfd05d91916d02d2c1814372efd4d06aa95 100755 (executable)
@@ -678,6 +678,9 @@ static int ehci_fsl_drv_suspend(struct platform_device *pdev,
                        usb_host_set_wakeup(hcd->self.controller, false);
 
                        fsl_usb_clk_gate(hcd->self.controller->platform_data, false);
+               } else {
+                       if (pdata->platform_phy_power_on)
+                               pdata->platform_phy_power_on();
                }
 
                printk(KERN_DEBUG "host suspend ends\n");