From: Orjan Friberg Date: Mon, 4 Jul 2011 18:12:12 +0200 Subject: [U-Boot] [PATCH v2] MUSB timeout broken Message-ID: <1309795932-17154-1-git-send-email-of@flatfrog.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Use pre-decrement to leave timeout at 0 when the timeout happens (which is what the timeout detecting code expects). Signed-off-by: Orjan Friberg --- drivers/usb/musb/musb_hcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 974bb31..adcf7f7 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -1114,7 +1114,7 @@ int usb_lowlevel_init(void) * should be a usb device connected. */ timeout = musb_cfg.timeout; - while (timeout--) + while (--timeout) if (readb(&musbr->devctl) & MUSB_DEVCTL_HM) break; -- 1.7.2.5