[U-Boot] [PATCH 3/3] musb: Program extvbus for OMAP3EVM Rev >= E

Ajay Kumar Gupta ajay.gupta at ti.com
Tue Jun 8 11:05:56 CEST 2010


OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus'
to '1' for OMAP3EVM Rev >=E runtime based on EVM revision.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta at ti.com>
---
 board/ti/evm/evm.c       |   13 +++++++++++++
 drivers/usb/musb/omap3.c |    3 +++
 drivers/usb/musb/omap3.h |    4 ++++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index fcc1803..9948b9c 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -65,6 +65,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.
  */
diff --git a/drivers/usb/musb/omap3.c b/drivers/usb/musb/omap3.c
index 4191d2e..4d1bdef 100644
--- a/drivers/usb/musb/omap3.c
+++ b/drivers/usb/musb/omap3.c
@@ -120,6 +120,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;
 	}
 
diff --git a/drivers/usb/musb/omap3.h b/drivers/usb/musb/omap3.h
index b591862..c934e0c 100644
--- a/drivers/usb/musb/omap3.h
+++ b/drivers/usb/musb/omap3.h
@@ -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 */
-- 
1.6.2.4



More information about the U-Boot mailing list