summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_phy_internal.c
diff options
context:
space:
mode:
authorHema HK <hemahk@ti.com>2011-02-28 09:49:36 +0100
committerFelipe Balbi <balbi@ti.com>2011-03-01 10:35:28 +0100
commit8c59ef38119102ccd2a8db6f19a8864a7c8d4e73 (patch)
tree2eb3db1db118811de9200838106d08051b71784b /arch/arm/mach-omap2/omap_phy_internal.c
parentusb: otg: TWL4030: Update the last_event variable. (diff)
downloadlinux-8c59ef38119102ccd2a8db6f19a8864a7c8d4e73.tar.xz
linux-8c59ef38119102ccd2a8db6f19a8864a7c8d4e73.zip
usb: otg: OMAP4430: Save/restore the context
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@ti.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_phy_internal.c')
-rw-r--r--arch/arm/mach-omap2/omap_phy_internal.c7
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 3ce675899fce..ebe33df708bd 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -43,6 +43,7 @@
static struct clk *phyclk, *clk48m, *clk32k;
static void __iomem *ctrl_base;
+static int usbotghs_control;
int omap4430_phy_init(struct device *dev)
{
@@ -129,6 +130,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);
@@ -137,6 +141,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;