diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_phy_internal.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_phy_internal.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 745252c60e32..3ce675899fce 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -103,13 +103,6 @@ int omap4430_phy_set_clk(struct device *dev, int on) | |||
103 | int omap4430_phy_power(struct device *dev, int ID, int on) | 103 | int omap4430_phy_power(struct device *dev, int ID, int on) |
104 | { | 104 | { |
105 | if (on) { | 105 | if (on) { |
106 | /* enabled the clocks */ | ||
107 | omap4430_phy_set_clk(dev, 1); | ||
108 | /* power on the phy */ | ||
109 | if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) { | ||
110 | __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); | ||
111 | mdelay(200); | ||
112 | } | ||
113 | if (ID) | 106 | if (ID) |
114 | /* enable VBUS valid, IDDIG groung */ | 107 | /* enable VBUS valid, IDDIG groung */ |
115 | __raw_writel(AVALID | VBUSVALID, ctrl_base + | 108 | __raw_writel(AVALID | VBUSVALID, ctrl_base + |
@@ -125,10 +118,25 @@ int omap4430_phy_power(struct device *dev, int ID, int on) | |||
125 | /* Enable session END and IDIG to high impedence. */ | 118 | /* Enable session END and IDIG to high impedence. */ |
126 | __raw_writel(SESSEND | IDDIG, ctrl_base + | 119 | __raw_writel(SESSEND | IDDIG, ctrl_base + |
127 | USBOTGHS_CONTROL); | 120 | USBOTGHS_CONTROL); |
121 | } | ||
122 | return 0; | ||
123 | } | ||
124 | |||
125 | int omap4430_phy_suspend(struct device *dev, int suspend) | ||
126 | { | ||
127 | if (suspend) { | ||
128 | /* Disable the clocks */ | 128 | /* Disable the clocks */ |
129 | omap4430_phy_set_clk(dev, 0); | 129 | omap4430_phy_set_clk(dev, 0); |
130 | /* Power down the phy */ | 130 | /* Power down the phy */ |
131 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); | 131 | __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF); |
132 | } else { | ||
133 | /* Enable the internel phy clcoks */ | ||
134 | omap4430_phy_set_clk(dev, 1); | ||
135 | /* power on the phy */ | ||
136 | if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) { | ||
137 | __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF); | ||
138 | mdelay(200); | ||
139 | } | ||
132 | } | 140 | } |
133 | 141 | ||
134 | return 0; | 142 | return 0; |