diff options
author | Ajay Kumar Gupta <ajay.gupta@ti.com> | 2010-06-10 11:20:48 +0530 |
---|---|---|
committer | Remy Bohmer <linux@bohmer.net> | 2010-06-30 21:37:37 +0200 |
commit | 9bb47abf0d88e2dd151b36b39bf64c6593f417c8 (patch) | |
tree | c608f275f52922fd85f5accb033973c417db07da /drivers/usb/musb/musb_core.c | |
parent | bbf4c01efc699f777687e4e5fcc3631749ee6813 (diff) | |
download | u-boot-imx-9bb47abf0d88e2dd151b36b39bf64c6593f417c8.zip u-boot-imx-9bb47abf0d88e2dd151b36b39bf64c6593f417c8.tar.gz u-boot-imx-9bb47abf0d88e2dd151b36b39bf64c6593f417c8.tar.bz2 |
musb: Add Phy programming for using external Vbus
MUSB PHY on OMAP3EVM Rev >= E uses external Vbus supply to support
500mA of power.We need to program MUSB PHY to use external Vbus
for this purpose.
Adding 'extvbus' member in musb_config structure which should be set
by all the boards where MUSB interface is using external Vbus supply.
Also added ULPI bus control register read/write abstraction for
Blackfin processor as it doesn't have ULPI registers.
CC: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 7766069..dc740cf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -34,6 +34,7 @@ void musb_start(void) { #if defined(CONFIG_MUSB_HCD) u8 devctl; + u8 busctl; #endif /* disable all interrupts */ @@ -45,6 +46,12 @@ void musb_start(void) /* put into basic highspeed mode and start session */ writeb(MUSB_POWER_HSENAB, &musbr->power); #if defined(CONFIG_MUSB_HCD) + /* Program PHY to use EXT VBUS if required */ + if (musb_cfg.extvbus == 1) { + busctl = musb_read_ulpi_buscontrol(musbr); + musb_write_ulpi_buscontrol(musbr, busctl | ULPI_USE_EXTVBUS); + } + devctl = readb(&musbr->devctl); writeb(devctl | MUSB_DEVCTL_SESSION, &musbr->devctl); #endif |