All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hema HK <hemahk-l0cyMroinI0@public.gmane.org>,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 5/5 v3] usb: otg: OMAP4430: Save/restore the context
Date: Mon, 28 Feb 2011 14:19:36 +0530	[thread overview]
Message-ID: <1298882976-4997-6-git-send-email-hemahk@ti.com> (raw)
In-Reply-To: <1298882976-4997-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>

Add the context save/restore for the control module register
used for OMAP4430 musb with UTMI embedded PHY interface.

Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm/mach-omap2/omap_phy_internal.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c
index c50441f..e2e605f 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -44,6 +44,7 @@
 
 static struct clk *phyclk, *clk48m, *clk32k;
 static void __iomem *ctrl_base;
+static int usbotghs_control;
 
 int omap4430_phy_init(struct device *dev)
 {
@@ -130,6 +131,9 @@ int omap4430_phy_suspend(struct device *dev, int suspend)
 		omap4430_phy_set_clk(dev, 0);
 		/* Power down the phy */
 		__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
+
+		/* save the context */
+		usbotghs_control = __raw_readl(ctrl_base + USBOTGHS_CONTROL);
 	} else {
 		/* Enable the internel phy clcoks */
 		omap4430_phy_set_clk(dev, 1);
@@ -138,6 +142,9 @@ int omap4430_phy_suspend(struct device *dev, int suspend)
 			__raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
 			mdelay(200);
 		}
+
+		/* restore the context */
+		__raw_writel(usbotghs_control, ctrl_base + USBOTGHS_CONTROL);
 	}
 
 	return 0;
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-02-28  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28  8:49 [PATCH 0/5 v3] usb: musb: Power management support Hema HK
2011-02-28  8:49 ` [PATCH 2/5 v3] usb: musb: Remove platform context save/restore API Hema HK
2011-02-28  8:49 ` [PATCH 3/5 v3] usb: musb: Idle path retention and offmode support for OMAP3 Hema HK
2011-02-28  8:49 ` [PATCH 4/5 v3] usb: musb: OMAP4430: Power down the PHY during board init Hema HK
     [not found] ` <1298882976-4997-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-28  8:49   ` [PATCH 1/5 v3] usb: otg: TWL4030: Update the last_event variable Hema HK
2011-02-28  8:49   ` Hema HK [this message]
2011-02-28  8:56   ` [PATCH 0/5 v3] usb: musb: Power management support Felipe Balbi
     [not found]     ` <20110228085611.GL2459-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-02-28 14:20       ` Greg KH
2011-02-28 21:22         ` Tony Lindgren
2011-02-28 21:36           ` Greg KH
2011-03-01  9:21             ` Felipe Balbi
     [not found]           ` <20110228212227.GK20560-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2011-03-01  9:26             ` Felipe Balbi
2011-03-01  9:32               ` Felipe Balbi
2011-03-01  9:37   ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1298882976-4997-6-git-send-email-hemahk@ti.com \
    --to=hemahk-l0cymroini0@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.