summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/davinci.c
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2010-03-15 10:51:36 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2010-03-15 10:51:36 +0900
commit995a4b1d83a08223c82c1e15778b02e85e5bba51 (patch)
tree0acb85278216df76d8fb7284b32d6dd95a1fc978 /drivers/usb/musb/davinci.c
parenta8d25fc26f681a9c4dfb062ebb4b00b9509a7966 (diff)
parent44de3e8ff7ed48bf96ec6c5e2173187d9c1c61e6 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts: board/davinci/da830evm/da830evm.c board/edb93xx/sdram_cfg.c board/esd/otc570/otc570.c board/netstar/eeprom.c board/netstar/eeprom_start.S cpu/arm920t/ep93xx/timer.c include/configs/netstar.h include/configs/otc570.h Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r--drivers/usb/musb/davinci.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index a7648fc452b..8fbadc962f4 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <asm/io.h>
#include "davinci.h"
+#include <asm/arch/hardware.h>
/* MUSB platform configuration */
struct musb_config musb_cfg = {
@@ -41,10 +42,25 @@ struct davinci_usb_regs *dregs;
static u8 phy_on(void)
{
u32 timeout;
-
+#ifdef DAVINCI_DM365EVM
+ u32 val;
+#endif
/* Wait until the USB phy is turned on */
+#ifdef DAVINCI_DM365EVM
+ writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN |
+ USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+#else
writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR);
+#endif
timeout = musb_cfg.timeout;
+
+#ifdef DAVINCI_DM365EVM
+ /* Set the ownership of GIO33 to USB */
+ val = readl(PINMUX4);
+ val &= ~(PINMUX4_USBDRVBUS_BITCLEAR);
+ val |= PINMUX4_USBDRVBUS_BITSET;
+ writel(val, PINMUX4);
+#endif
while (timeout--)
if (readl(USBPHY_CTL_PADDR) & USBPHY_PHYCLKGD)
return 1;
@@ -70,8 +86,9 @@ 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;