Skip to contentSkip to conversation

console: USB: KBD: Fix incorrect autoboot timeout

PATCH New Jim Lin 6 participants 16 messages Jan 24, 2013 – Mar 21, 2013 1 message not in the archive

lore
Share & tools
lore

Jim Lin

author
#0 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

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.

---
Changes in v2:
- use do-while and get_timer to count timeout.
Changes in v3:
- revert original udelay(10000); for safety.

 common/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
common/main.c +5 -5
index b145f85..dcd2a42 100644
@@ -225,6 +225,7 @@ static inline
 int abortboot(int bootdelay)
 {
 	int abort = 0;
+	unsigned long ts;
 
 #ifdef CONFIG_MENUPROMPT
 	printf(CONFIG_MENUPROMPT);
@@ -248,11 +249,10 @@ int abortboot(int bootdelay)
 #endif
 
 	while ((bootdelay > 0) && (!abort)) {
-		int i;
-
 		--bootdelay;
-		/* delay 100 * 10ms */
-		for (i=0; !abort && i<100; ++i) {
+		/* 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	*/
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
 				break;
 			}
 			udelay(10000);
-		}
+		} while (!abort && get_timer(ts) < 1000);
 
 		printf("\b\b\b%2d ", bootdelay);
 	}
Signature · 9 lines
1.7.3


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
#1 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Jim Lin,

Quoted 6 lines

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.

Applied to u-boot-usb
Thanks

Best regards,
Marek Vasut

#2 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Marek Vasut,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 7 lines

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.

Applied to u-boot-usb

This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo.

Best regards,

Wolfgang Denk

Signature · 7 lines
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 at denx.de
Alan Turing thought about criteria to settle the question of  whether
machines  can think, a question of which we now know that it is about
as relevant as the question of whether submarines can swim.
                                                   -- Edsger Dijkstra
#3 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Wolfgang Denk,

Quoted 8 lines

Dear Marek Vasut,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 5 lines

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.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Applied to u-boot-usb

This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo.

Either way is fine by me. Maybe the usb: tag should be removed then too.

Best regards,
Marek Vasut

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Tom Warren,

Quoted 22 lines

Wolfgang,

Quoted 20 lines

-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Saturday, January 26, 2013 6:14 AM
To: Marek Vasut
Cc: Jim Lin; u-boot at lists.denx.de; Tom Warren; trini at ti.com; albert.u.boot at aribaud.net
Subject: Re: [PATCH 1/1 v3] console: USB: KBD: Fix incorrect autoboot timeout

Dear Marek Vasut,

Quoted 2 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are

defined in

Quoted 3 lines
Quoted 3 lines

configuration file and when tstc() function for checking key pressed takes longer time than 10 ms (e.g., 50 ms) to finish.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Applied to u-boot-usb

This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo.

Why do you expect this to go thru the Tegra tree?

Tom Rini ... you're not the only Tom around here :p [...]

Best regards,
Marek Vasut

#6 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

In reply to a message not in the archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Tom Warren

Wolfgang,

Quoted 20 lines

-----Original Message----- From: Wolfgang Denk
[mailto:wd at denx.de] Sent: Saturday, January 26, 2013 6:14 AM To:
Marek Vasut Cc: Jim Lin; u-boot at lists.denx.de; Tom Warren; trini at ti.com; albert.u.boot at aribaud.net Subject: Re: [PATCH 1/1 v3] console: USB: KBD: Fix incorrect autoboot timeout

Dear Marek Vasut,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines

Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are

defined in

Quoted 6 lines
Quoted 5 lines

configuration file and when tstc() function for checking key pressed takes longer time than 10 ms (e.g., 50 ms) to finish.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Applied to u-boot-usb

This is common code, and essentially unrelated to USB. It should go through Tom, not through the USB repo.

Why do you expect this to go thru the Tegra tree? It's common code
- shouldn't it at least go thru my parent repo (ARM), if no directly into u-boot.git/master?

I think he means me :)

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRBqk8AAoJENk4IS6UOR1WnqwQAI0Gpysj7oZjelcF7XDYVOPu /9rIsi3ZiB5+xtENWTBV08Y8GKpfNIdqMyMqQ3V6kWFSTAVzoNZDtoX3KX01Vvc8 SZ8LDlpQFzW1cCYxLcRdXIOmCXrUoc/qoJgbmYYHrnlZOHmSW1rrZTE2iW9QUe69 4YfmWDD5sVx/fGKXZvbzYu1Nt24qWtCXxGZ0jWBv3mPpvOtnyfePeUKdHhakn8PE eTI9MUXXsOCX4Sbj2anPKbmp+W4f6bKvl0OpBBQNHSuD5tYthuM/YTpmhwSnaGtr 8QiJNIc7nliSmQh4y0XrIqEaN3KC6oIN6VjO2uM5+TVern9HYIazy+uXXRvQvA5c wq+Xb2mxIZf4vet9BbAWIpNN7w5I6adnC1APM5I47IMQyxGfesi4cdt6JY/X4M+z xr9DZo4kcmszhAfSNH12MndQfutH6INcZeOpMFFZe+2h51XrbufUsT3mNwvsmcCT 6+Ef1VoMfpB0ZrCPxk969twm8sXarD2d6KW5uO/jDJF3ENoXIUEEbZpT8Sz/mlgJ 9bNyddsEptXS4mRoUszcWItc5Stok1fNYmECkknpPFOm01s7x6XUuRBpV72jFiwM +/d7K+wAH8jm9y0Ij2Ya3w8bKnilEAA3nJpbr5K9wPLEFqNrX++es/44lxQGb/vI OjPexZLYrEG9okXEC83v
=cV3l
-----END PGP SIGNATURE-----

#7 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

In reply to Jim Lin
Quoted 6 lines · Jim Lin

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130204/ef315778/attachment.pgp>
#8 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

In reply to Jim Lin
Quoted 43 lines · Jim Lin

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.

---
Changes in v2:
- use do-while and get_timer to count timeout.
Changes in v3:
- revert original udelay(10000); for safety.

 common/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
common/main.c +4 -4
index b145f85..dcd2a42 100644
@@ -225,6 +225,7 @@ static inline
 int abortboot(int bootdelay)
 {
 	int abort = 0;
+	unsigned long ts;
 
 #ifdef CONFIG_MENUPROMPT
 	printf(CONFIG_MENUPROMPT);
@@ -248,11 +249,10 @@ int abortboot(int bootdelay)
 #endif
 
 	while ((bootdelay > 0) && (!abort)) {
-		int i;
-
 		--bootdelay;
-		/* delay 100 * 10ms */
-		for (i=0; !abort && i<100; ++i) {
+		/* 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	*/

common/main.c int abortboot(int bootdelay) · line 270

Quoted 8 lines
common/main.c +1 -1
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
 				break;
 			}
 			udelay(10000);
-		}
+		} while (!abort && get_timer(ts) < 1000);
 
 		printf("\b\b\b%2d ", bootdelay);
 	}

This change is causing problems with auto-delay on one of my boards by making it inaccurate :-(

The question is what should get_timer() be returning? If it is meant to be milliseconds then I guess I need to fix get_timer() for my board. However, if it is just meant to be timer ticks at the SYS_HZ rate then I don't see how the above change guarantees the do-while loop waits 1000 ms per iteration without normalising to SYS_HZ.

For my board I made the following change to make it work ...

common/main.c +1 -1
index a15f020..32c4f8a 100644
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
                                break;
                        }
                        udelay(10000);
-               } while (!abort && get_timer(ts) < 1000);
+               } while (!abort && !(get_timer(ts) / CONFIG_SYS_HZ));
 
                printf("\b\b\b%2d ", bootdelay);
 

Cheers
Jon

#9 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Jon Hunter,

Quoted 74 lines · Jim Lin
Quoted 66 lines

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.

---

Changes in v2:
- use do-while and get_timer to count timeout.

Changes in v3:
- revert original udelay(10000); for safety.

 common/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
common/main.c +1 -0
index b145f85..dcd2a42 100644
@@ -225,6 +225,7 @@ static inline
 
 int abortboot(int bootdelay)
 {
 
 	int abort = 0;
 
+	unsigned long ts;

#ifdef CONFIG_MENUPROMPT

common/main.c +4 -5
 	printf(CONFIG_MENUPROMPT);
@@ -248,11 +249,10 @@ int abortboot(int bootdelay)
 
 #endif
 
 	while ((bootdelay > 0) && (!abort)) {
 
-		int i;
-
 
 		--bootdelay;
 
-		/* delay 100 * 10ms */
-		for (i=0; !abort && i<100; ++i) {
+		/* 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	*/
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
 
 				break;
 
 			}
 			udelay(10000);
 
-		}
+		} while (!abort && get_timer(ts) < 1000);

common/main.c int abortboot(int bootdelay)

Quoted 3 lines
common/main.c +0 -0
 		printf("\b\b\b%2d ", bootdelay);
 
 	}

This change is causing problems with auto-delay on one of my boards by making it inaccurate :-(

Quoted 5 lines

The question is what should get_timer() be returning? If it is meant to be milliseconds then I guess I need to fix get_timer() for my board. However, if it is just meant to be timer ticks at the SYS_HZ rate then I don't see how the above change guarantees the do-while loop waits 1000 ms per iteration without normalising to SYS_HZ.

What board is it ?

Best regards,
Marek Vasut

#10 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Hi Marek,

Quoted 76 lines · Marek Vasut

Dear Jon Hunter,

Quoted 74 lines · Jim Lin
Quoted 66 lines

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.

---

Changes in v2:
- use do-while and get_timer to count timeout.

Changes in v3:
- revert original udelay(10000); for safety.

 common/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
common/main.c +1 -0
index b145f85..dcd2a42 100644
@@ -225,6 +225,7 @@ static inline
 
 int abortboot(int bootdelay)
 {
 
 	int abort = 0;
 
+	unsigned long ts;

#ifdef CONFIG_MENUPROMPT

common/main.c +4 -5
 	printf(CONFIG_MENUPROMPT);
@@ -248,11 +249,10 @@ int abortboot(int bootdelay)
 
 #endif
 
 	while ((bootdelay > 0) && (!abort)) {
 
-		int i;
-
 
 		--bootdelay;
 
-		/* delay 100 * 10ms */
-		for (i=0; !abort && i<100; ++i) {
+		/* 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	*/
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
 
 				break;
 
 			}
 			udelay(10000);
 
-		}
+		} while (!abort && get_timer(ts) < 1000);

common/main.c int abortboot(int bootdelay)

Quoted 3 lines
common/main.c +0 -0
 		printf("\b\b\b%2d ", bootdelay);
 
 	}

This change is causing problems with auto-delay on one of my boards by making it inaccurate :-(

Quoted 7 lines
Quoted 5 lines

The question is what should get_timer() be returning? If it is meant to be milliseconds then I guess I need to fix get_timer() for my board. However, if it is just meant to be timer ticks at the SYS_HZ rate then I don't see how the above change guarantees the do-while loop waits 1000 ms per iteration without normalising to SYS_HZ.

What board is it ?

It is an OMAP2420-H4 board (ARM11). The timer is using a very odd SYS_HZ value of ~46875 (I believe this is because this is the most they can divide down the 12MHz clock source by). The timer could be switched to use a 32kHz clock source instead of the 12MHz clock source and get something closer to 1ms. However, I would need to test to see if this causes any other problems.

Cheers
Jon

#11 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Jon Hunter,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines

The question is what should get_timer() be returning? If it is meant to be milliseconds then I guess I need to fix get_timer() for my board. However, if it is just meant to be timer ticks at the SYS_HZ rate then I

It is ticks at SYS_HZ rate with SYS_HZ==1000, i. e. milliseconds.

Best regards,

Wolfgang Denk

Signature · 5 lines
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 at denx.de
When the bosses talk about improving  productivity,  they  are  never
talking about themselves.
author
#12 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

In reply to Jon Hunter

Thanks for pointing out the potential issue.

-----Original Message-----
From: Jon Hunter [mailto:jon-hunter at ti.com]
Sent: Thursday, March 21, 2013 7:57 AM
To: Jim Lin
Cc: u-boot at lists.denx.de; marex at denx.de; wd at denx.de; trini at ti.com; Tom Warren
Subject: Re: [U-Boot] [PATCH 1/1 v3] console: USB: KBD: Fix incorrect autoboot timeout

Quoted 42 lines · Jim Lin

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.

---
Changes in v2:
- use do-while and get_timer to count timeout.
Changes in v3:
- revert original udelay(10000); for safety.

 common/main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
common/main.c index b145f85..dcd2a42 renamed from common/main.c +0 -0

100644

common/main.c +4 -4
@@ -225,6 +225,7 @@ static inline
 int abortboot(int bootdelay)
 {
 	int abort = 0;
+	unsigned long ts;
 
 #ifdef CONFIG_MENUPROMPT
 	printf(CONFIG_MENUPROMPT);
@@ -248,11 +249,10 @@ int abortboot(int bootdelay)  #endif
 
 	while ((bootdelay > 0) && (!abort)) {
-		int i;
-
 		--bootdelay;
-		/* delay 100 * 10ms */
-		for (i=0; !abort && i<100; ++i) {
+		/* 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	*/

common/main.c int abortboot(int bootdelay) · line 270

Quoted 8 lines
common/main.c +1 -1
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
 				break;
 			}
 			udelay(10000);
-		}
+		} while (!abort && get_timer(ts) < 1000);
 
 		printf("\b\b\b%2d ", bootdelay);
 	}

This change is causing problems with auto-delay on one of my boards by making it inaccurate :-(

The question is what should get_timer() be returning? If it is meant to be milliseconds then I guess I need to fix get_timer() for my board.
However, if it is just meant to be timer ticks at the SYS_HZ rate then I don't see how the above change guarantees the do-while loop waits 1000 ms per iteration without normalising to SYS_HZ.

For my board I made the following change to make it work ...

common/main.c +1 -1
@@ -264,7 +264,7 @@ int abortboot(int bootdelay)
                                break;
                        }
                        udelay(10000);
-               } while (!abort && get_timer(ts) < 1000);
+               } while (!abort && !(get_timer(ts) / CONFIG_SYS_HZ));
 
                printf("\b\b\b%2d ", bootdelay);
 

--
nvpublic

#13 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

In reply to Jon Hunter
Quoted 6 lines · Jon Hunter
Quoted 4 lines · Jim Lin

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.

...

Quoted 2 lines

This change is causing problems with auto-delay on one of my boards by making it inaccurate :-(

Interesting. I just noticed the same problem, and posted the following patch to fix it:

http://lists.denx.de/pipermail/u-boot/2013-March/149625.html

This was on the Raspberry Pi.

#14 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Stephen Warren,

Quoted 7 lines · In message <[email protected]> you wrote:

Interesting. I just noticed the same problem, and posted the following patch to fix it:

http://lists.denx.de/pipermail/u-boot/2013-March/149625.html

This was on the Raspberry Pi.

You mean the Raspberry Pi uses SYS_HZ != 1000 ???

This needs fixing!!

Best regards,

Wolfgang Denk

Signature · 7 lines
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 at denx.de
There are two ways of constructing a software design. One way  is  to
make  it  so  simple that there are obviously no deficiencies and the
other is to make it so complicated that there are  no  obvious  defi-
ciencies.                             - Charles Anthony Richard Hoare
#15 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Quoted 7 lines · Wolfgang Denk

Dear Stephen Warren,

Quoted 4 lines · In message <[email protected]> you wrote:

Interesting. I just noticed the same problem, and posted the following patch to fix it:

Quoted 7 lines
Quoted 3 lines

http://lists.denx.de/pipermail/u-boot/2013-March/149625.html

This was on the Raspberry Pi.

You mean the Raspberry Pi uses SYS_HZ != 1000 ???

This needs fixing!!

I understand that you may wish to have SYS_HZ == 1000, but shouldn't the code still normalise the get_timer() value to SYS_HZ?

If I grep through the u-boot source I see a lot of instances where get_timer() is normalised to SYS_HZ.

grep -r "get_timer" * | grep "SYS_HZ"

Cheers
Jon

#16 lore raw

PATCH v3 1/1 console: USB: KBD: Fix incorrect autoboot timeout

Dear Jon Hunter,

Quoted 8 lines · In message <[email protected]> you wrote:

I understand that you may wish to have SYS_HZ == 1000, but shouldn't the code still normalise the get_timer() value to SYS_HZ?

If I grep through the u-boot source I see a lot of instances where get_timer() is normalised to SYS_HZ.

grep -r "get_timer" * | grep "SYS_HZ"

get_timer() is supposed to work in milliseconds.

Best regards,

Wolfgang Denk

Signature · 5 lines
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 at denx.de
Die Scheu vor Verantwortung ist die Krankheit unserer Zeit.
                                                 -- Otto von Bismarck