From: yangkai <yangkai@ubuntu-fs>
Date: Tue, 5 Jul 2011 02:10:50 +0000 (+0800)
Subject: usb host controller support remote wakeup
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=00a908a9fcb26909c2913ec7554d69077d96e3f7;p=firefly-linux-kernel-4.4.55.git

usb host controller support remote wakeup
---

diff --git a/drivers/usb/dwc_otg/Kconfig b/drivers/usb/dwc_otg/Kconfig
index a95b9a3e368d..87d2a37e4018 100755
--- a/drivers/usb/dwc_otg/Kconfig
+++ b/drivers/usb/dwc_otg/Kconfig
@@ -89,6 +89,9 @@ config DWC_OTG_DEBUG
 	bool "DWC_OTG debug messages"
 	depends on USB11_HOST || USB20_HOST || USB20_OTG
 
+config DWC_REMOTE_WAKEUP
+	bool "remote wakeup support in DWC_OTG controller"
+	depends on USB11_HOST || USB20_HOST || USB20_OTG
 config DWC_OTG
 	tristate	
 	default y if USB11_HOST || USB20_HOST || USB20_OTG
diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd.c b/drivers/usb/dwc_otg/dwc_otg_hcd.c
index ba742e4bbedf..8ae2f504de2d 100755
--- a/drivers/usb/dwc_otg/dwc_otg_hcd.c
+++ b/drivers/usb/dwc_otg/dwc_otg_hcd.c
@@ -105,8 +105,10 @@ static int dwc_otg_hcd_suspend(struct usb_hcd *hcd)
         }
     }
     udelay(3);
+    #ifndef CONFIG_DWC_REMOTE_WAKEUP
     clk_disable(core_if->otg_dev->phyclk);
     clk_disable(core_if->otg_dev->ahbclk);
+    #endif
     //power off
     return 0;
 }
@@ -124,9 +126,10 @@ static int dwc_otg_hcd_resume(struct usb_hcd *hcd)
     	DWC_PRINT("%s, usb device mode\n", __func__);
     	return 0;
     }
+    #ifndef CONFIG_DWC_REMOTE_WAKEUP
     clk_enable(core_if->otg_dev->phyclk);
     clk_enable(core_if->otg_dev->ahbclk);
-    
+    #endif
     //partial power-down
     //power on
     pcgcctl.d32 = dwc_read_reg32(core_if->pcgcctl);;