X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fusb%2Fmusb%2Fmusb_core.c;h=6fe2c39bce800cb6eac58008431f8c3a2fb36f10;hb=5549d22b656550d36b2cc46743c7220ab0e9dcc4;hp=7766069bfcfdb25ca04551783c61f2f560df428a;hpb=f8b365ceb64e0b86bea243d783ff94687302cba9;p=oweals%2Fu-boot.git diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 7766069bfc..6fe2c39bce 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 @@ -134,6 +141,11 @@ void write_fifo(u8 ep, u32 length, void *fifo_data) writeb(*data++, &musbr->fifox[ep]); } +/* + * AM35x supports only 32bit read operations so + * use seperate read_fifo() function for it. + */ +#ifndef CONFIG_USB_AM35X /* * This function reads data from endpoint fifo * @@ -153,3 +165,4 @@ void read_fifo(u8 ep, u32 length, void *fifo_data) while (length--) *data++ = readb(&musbr->fifox[ep]); } +#endif /* CONFIG_USB_AM35X */