aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_phy_internal.c
diff options
context:
space:
mode:
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 @@
43 43
44static struct clk *phyclk, *clk48m, *clk32k; 44static struct clk *phyclk, *clk48m, *clk32k;
45static void __iomem *ctrl_base; 45static void __iomem *ctrl_base;
46static int usbotghs_control;
46 47
47int omap4430_phy_init(struct device *dev) 48int omap4430_phy_init(struct device *dev)
48{ 49{
@@ -129,6 +130,9 @@ int omap4430_phy_suspend(struct device *dev, int suspend)
129 omap4430_phy_set_clk(dev, 0); 130 omap4430_phy_set_clk(dev, 0);
130 /* Power down the phy */ 131 /* Power down the phy */
131 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); 132 __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
133
134 /* save the context */
135 usbotghs_control = __raw_readl(ctrl_base + USBOTGHS_CONTROL);
132 } else { 136 } else {
133 /* Enable the internel phy clcoks */ 137 /* Enable the internel phy clcoks */
134 omap4430_phy_set_clk(dev, 1); 138 omap4430_phy_set_clk(dev, 1);
@@ -137,6 +141,9 @@ int omap4430_phy_suspend(struct device *dev, int suspend)
137 __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); 141 __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
138 mdelay(200); 142 mdelay(200);
139 } 143 }
144
145 /* restore the context */
146 __raw_writel(usbotghs_control, ctrl_base + USBOTGHS_CONTROL);
140 } 147 }
141 148
142 return 0; 149 return 0;