[U-Boot] [PATCH v6 01/11] usb, davinci: add enable_vbus() weak function

Heiko Schocher hs at denx.de
Wed Nov 2 07:00:25 CET 2011


Signed-off-by: Heiko Schocher <hs at denx.de>
Cc: Remy Bohmer <linux at bohmer.net>
Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
Cc: Igor Grinberg <grinberg at compulab.co.il>

---
changes for v4:
- patch is new since v4, as Igor Grinberg suggested.
changes for v6:
- make enable_vbus() weak with alias

 drivers/usb/musb/davinci.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index f56f2df..c94a762 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -78,6 +78,17 @@ static void phy_off(void)
 	writel(USBPHY_OSCPDWN | USBPHY_PHYPDWN, USBPHY_CTL_PADDR);
 }
 
+void __enable_vbus(void)
+{
+	/*
+	 *  nothing to do, vbus is handled through the cpu.
+	 *  Define this function in board code, if it is
+	 *  different on your board.
+	 */
+}
+void  enable_vbus(void)
+	__attribute__((weak, alias("__enable_vbus")));
+
 /*
  * This function performs Davinci platform specific initialization for usb0.
  */
@@ -86,9 +97,8 @@ int musb_platform_init(void)
 	u32  revision;
 
 	/* enable USB VBUS */
-#ifndef DAVINCI_DM365EVM
 	enable_vbus();
-#endif
+
 	/* start the on-chip USB phy and its pll */
 	if (!phy_on())
 		return -1;
-- 
1.7.6.4



More information about the U-Boot mailing list