All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1 v2] console: USB: KBD: Fix incorrect autoboot timeout
Date: Wed, 23 Jan 2013 20:33:49 +0100	[thread overview]
Message-ID: <20130123193349.17C612454A1@gemini.denx.de> (raw)
In-Reply-To: <1358937511-32664-1-git-send-email-jilin@nvidia.com>

Dear Jim Lin,

In message <1358937511-32664-1-git-send-email-jilin@nvidia.com> you wrote:
> Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if
> CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in
> configuration file and when tstc() function for checking key pressed
> takes longer time than 10 ms (e.g., 50 ms) to finish.

Thanks.  One minor nitpick...

> +		/* delay 1000 ms */
> +		ts = get_timer(0);
> +		do {
>  			if (tstc()) {	/* we got a key press	*/
>  				abort  = 1;	/* don't auto boot	*/
>  				bootdelay = 0;	/* no more delay	*/
> @@ -263,8 +263,7 @@ int abortboot(int bootdelay)
>  # endif
>  				break;
>  			}
> -			udelay(10000);
> -		}
> +		} while (!abort && get_timer(ts) < 1000);

I recommend to keep a short udelay() [say, an udelay(1000)] in the
loop, as this will make sure that watchdog still gets triggered on
systems that need this.

Thaks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Oblivion together does not frighten me, beloved.
	-- Thalassa (in Anne Mulhall's body), "Return to Tomorrow",
	   stardate 4770.3.

  reply	other threads:[~2013-01-23 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 10:38 [U-Boot] [PATCH 1/1 v2] console: USB: KBD: Fix incorrect autoboot timeout Jim Lin
2013-01-23 19:33 ` Wolfgang Denk [this message]
2013-01-24 10:38   ` Jim Lin

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=20130123193349.17C612454A1@gemini.denx.de \
    --to=wd@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.