aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-12-24 00:48:02 -0500
committerFelipe Balbi <balbi@ti.com>2015-01-12 13:13:28 -0500
commitfdf80e78acbaa6a50531490b3a6ba027a52a69ad (patch)
treed3e03f090ebd5fe1c7145f1d86269be600325503 /drivers/usb/phy
parent6b448af46e2a2fc9563fd86fb3b7cf06fcf2dd47 (diff)
usb: phy: phy-mxs-usb: add power down and disable wakeup for .shutdown
When we shut down the PHY, we need to power down all PHY's functions as well as disable wakeup, it is the opposite operation we do at .init. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r--drivers/usb/phy/phy-mxs-usb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index b9589f663683..eaf94b036571 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -293,6 +293,17 @@ static int mxs_phy_init(struct usb_phy *phy)
293static void mxs_phy_shutdown(struct usb_phy *phy) 293static void mxs_phy_shutdown(struct usb_phy *phy)
294{ 294{
295 struct mxs_phy *mxs_phy = to_mxs_phy(phy); 295 struct mxs_phy *mxs_phy = to_mxs_phy(phy);
296 u32 value = BM_USBPHY_CTRL_ENVBUSCHG_WKUP |
297 BM_USBPHY_CTRL_ENDPDMCHG_WKUP |
298 BM_USBPHY_CTRL_ENIDCHG_WKUP |
299 BM_USBPHY_CTRL_ENAUTOSET_USBCLKS |
300 BM_USBPHY_CTRL_ENAUTOCLR_USBCLKGATE |
301 BM_USBPHY_CTRL_ENAUTOCLR_PHY_PWD |
302 BM_USBPHY_CTRL_ENAUTOCLR_CLKGATE |
303 BM_USBPHY_CTRL_ENAUTO_PWRON_PLL;
304
305 writel(value, phy->io_priv + HW_USBPHY_CTRL_CLR);
306 writel(0xffffffff, phy->io_priv + HW_USBPHY_PWD);
296 307
297 writel(BM_USBPHY_CTRL_CLKGATE, 308 writel(BM_USBPHY_CTRL_CLKGATE,
298 phy->io_priv + HW_USBPHY_CTRL_SET); 309 phy->io_priv + HW_USBPHY_CTRL_SET);