All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] davinci, dm365, usb: timeoutvalue
Date: Wed, 06 Jul 2011 13:29:20 +0200	[thread overview]
Message-ID: <4E144710.7020807@denx.de> (raw)

Hello Thomas,

I just debugging some usb issues on an dm365 based board. I noticed
that if no usb device is connected to the board, the "usb start"
command does have a long timeout (also have access to an dm365evm
board, same behaviour). Found the reason for this big timeout here:

./drivers/usb/musb/musb_hcd.c usb_lowlevel_init():
	timeout = musb_cfg.timeout;
        while (timeout--)
                if (readb(&musbr->devctl) & MUSB_DEVCTL_HM)
                        break;


with ./drivers/usb/musb/davinci.:
/* MUSB platform configuration */
struct musb_config musb_cfg = {
        .regs           = (struct musb_regs *)MENTOR_USB0_BASE,
        .timeout        = DAVINCI_USB_TIMEOUT,
        .musb_speed     = 0,
};

and ./drivers/usb/musb/davinci.h:

#define DAVINCI_USB_TIMEOUT 0x3FFFFFF

Why is this DAVINCI_USB_TIMEOUT value so high? This could be shorter,
or are there some reasons for such a long timeout?

Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

             reply	other threads:[~2011-07-06 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 11:29 Heiko Schocher [this message]
2011-07-06 14:06 ` [U-Boot] davinci, dm365, usb: timeoutvalue Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E144710.7020807@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.