u-boot-brain/drivers/usb/musb
Matej Frančeškin 8c86501819 MUSB driver: Timeout is never detected as the while loop does not end
Timeout variable is decremented once more when while condition is not met.
Following "if" does not detect correctly that timeout has occurred.
Because of this bug the "usb start" command on AM335X-EVM board did not detect correctly that USB device was not attached.

	timeout = musb_cfg.timeout;
	while (timeout--)
		if (readb(&musbr->devctl) & MUSB_DEVCTL_HM)
 			break;
	/* if musb core is not in host mode, then return */
	if (!timeout)
		return -1;

Signed-off-by: Matej Franceskin <Matej.Franceskin@comtrade.com>
CC: Marek Vasut <matex@denx.de>?
2012-09-01 16:21:53 +02:00
..
am35x.c musb: am35x: Workaround for fifo read issue 2010-08-12 16:40:00 +02:00
am35x.h musb: MSC host support for AM35x 2010-08-12 16:40:00 +02:00
blackfin_usb.c usb: musb: blackfin: check anomaly workarounds at runtime too 2011-04-02 09:38:24 +02:00
blackfin_usb.h usb: musb: fix Blackfin DMA register padding 2010-02-03 22:06:59 +01:00
da8xx.c musb: Use name based initialization for musb_config 2010-06-30 21:37:37 +02:00
da8xx.h DaVinci: rename gpio_defs.h to gpio.h 2011-08-03 12:49:19 +02:00
davinci.c arm, usb, davinci: make USBPHY_CTL register configurable 2011-11-03 22:56:24 +01:00
davinci.h musb: Add host support for DM365 EVM 2010-02-03 22:06:59 +01:00
Makefile Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
musb_core.c usb: musb: constify a bit 2010-10-22 21:41:46 +02:00
musb_core.h ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment 2012-07-18 14:43:29 +02:00
musb_debug.h OMAP3 Add usb device support 2009-12-20 12:47:37 +01:00
musb_hcd.c MUSB driver: Timeout is never detected as the while loop does not end 2012-09-01 16:21:53 +02:00
musb_hcd.h usb: musb: add virtual root hub control support 2010-01-12 20:11:27 +01:00
musb_udc.c drivers/usb/musb/musb_udc.c: Fix GCC 4.6 warning 2011-12-09 10:36:33 +01:00
omap3.c ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4 2010-08-05 10:11:34 -04:00
omap3.h ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4 2010-08-05 10:11:34 -04:00