Hello.

On 07-09-2011 21:02, Ajay Kumar Gupta wrote:

Adding ti81xx_musb_phy_power() which will be used by musb driver through
its function pointer in board_data.

Signed-off-by: Ajay Kumar Gupta<ajay.gu...@ti.com>
Signed-off-by: Ravi Babu<ravib...@ti.com>
---
  arch/arm/mach-omap2/omap_phy_internal.c |   24 +++++++++++++++++++++++
  arch/arm/plat-omap/include/plat/usb.h   |   32 +++++++++++++++++++++++++++++++
  2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_phy_internal.c 
b/arch/arm/mach-omap2/omap_phy_internal.c
index 58775e3..352b6af 100644
--- a/arch/arm/mach-omap2/omap_phy_internal.c
+++ b/arch/arm/mach-omap2/omap_phy_internal.c
@@ -260,3 +260,27 @@ void am35x_set_mode(u8 musb_mode)

        omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2);
  }
+
+void ti81xx_musb_phy_power(u8 on)
+{
+       u32 usbphycfg = omap_ctrl_readl(USBCTRL0);
+
+       if (on) {
+               if (cpu_is_ti816x()) {
+                       usbphycfg |= TI816X_USBPHY0_NORMAL_MODE;
+                       usbphycfg &= ~TI816X_USBPHY_REFCLK_OSC;
+               } else if (cpu_is_ti814x()) {
+                       usbphycfg&= ~(USBPHY_CM_PWRDN | USBPHY_OTG_PWRDN
+                               | USBPHY_DPINPUT | USBPHY_DMINPUT);
+                       usbphycfg |= (USBPHY_OTGVDET_EN | USBPHY_OTGSESSEND_EN
+                               | USBPHY_DPOPBUFCTL | USBPHY_DPOPBUFCTL);

   Same #define repeated twice?

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to