public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ajay Kumar Gupta <ajay.gupta@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] musb: Program extvbus for OMAP3EVM Rev >= E
Date: Wed,  9 Jun 2010 16:15:34 +0530	[thread overview]
Message-ID: <1276080334-930-4-git-send-email-ajay.gupta@ti.com> (raw)
In-Reply-To: <1276080334-930-3-git-send-email-ajay.gupta@ti.com>

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@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 785629c..a983552 100644
--- a/drivers/usb/musb/omap3.c
+++ b/drivers/usb/musb/omap3.c
@@ -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;
 	}
 
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

  reply	other threads:[~2010-06-09 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 10:45 [U-Boot] [PATCH 1/4 v2] musb: Use name based initialization for musb_config Ajay Kumar Gupta
2010-06-09 10:45 ` [U-Boot] [PATCH 2/4 v2] musb: Add Phy programming for using external Vbus Ajay Kumar Gupta
2010-06-09 10:45   ` [U-Boot] [PATCH 3/4 v2] omap3evm: Add board revision function Ajay Kumar Gupta
2010-06-09 10:45     ` Ajay Kumar Gupta [this message]
2010-06-09 23:05   ` [U-Boot] [PATCH 2/4 v2] musb: Add Phy programming for using external Vbus Mike Frysinger
2010-06-10  5:46     ` Gupta, Ajay Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1276080334-930-4-git-send-email-ajay.gupta@ti.com \
    --to=ajay.gupta@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox