]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
musb: Program extvbus for OMAP3EVM Rev >= E
authorAjay Kumar Gupta <ajay.gupta@ti.com>
Thu, 10 Jun 2010 05:50:50 +0000 (11:20 +0530)
committerRemy Bohmer <linux@bohmer.net>
Wed, 30 Jun 2010 19:37:37 +0000 (21:37 +0200)
OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus'
to '1' for OMAP3EVM Rev >=E runtime based on EVM revision.

CC: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
board/ti/evm/evm.c
drivers/usb/musb/omap3.c
drivers/usb/musb/omap3.h

index fcc1803bcd4f1a221f529949791f63c6631c9e87..9948b9cd30e7742354f31a829ddd6c8c7da25e5e 100644 (file)
@@ -64,6 +64,19 @@ static void omap3_evm_get_revision(void)
        }
 }
 
+/*
+ * MUSB port on OMAP3EVM Rev >= E requires extvbus programming.
+ */
+u8 omap3_evm_need_extvbus(void)
+{
+       u8 retval = 0;
+
+       if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
+               retval = 1;
+
+       return retval;
+}
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
index 785629cb7baf5627f1c76606d42fcad7cfa44868..a983552357c16e185064a71a9a7f79d2b553089b 100644 (file)
@@ -119,6 +119,9 @@ int musb_platform_init(void)
                stdby &= ~OMAP3_OTG_FORCESTDBY_STANDBY;
                writel(stdby, &otg->forcestdby);
 
+#ifdef CONFIG_OMAP3_EVM
+               musb_cfg.extvbus = omap3_evm_need_extvbus();
+#endif
                platform_needs_initialization = 0;
        }
 
index b591862b2d2b6262ce0bb5471e397c40c6c01506..c934e0cadd1b49316bb410d42bc056780f6572ae 100644 (file)
@@ -44,4 +44,8 @@
 
 int musb_platform_init(void);
 
+#ifdef CONFIG_OMAP3_EVM
+extern u8 omap3_evm_use_extvbus(void);
+#endif
+
 #endif /* _MUSB_OMAP3_H */