Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235374
b: refs/heads/master
c: 8c59ef3
h: refs/heads/master
v: v3
  • Loading branch information
Hema HK authored and Felipe Balbi committed Mar 1, 2011
1 parent 1a7d7ae commit 9100c28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37db3af11f02c2ccdf44a788694da16062a0333c
refs/heads/master: 8c59ef38119102ccd2a8db6f19a8864a7c8d4e73
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-omap2/omap_phy_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 9100c28

Please sign in to comment.