[U-Boot-Users] [PATCH] Make sleep shell command is reliable for all architectures

Wolfgang Denk wd at denx.de
Tue May 20 16:23:58 CEST 2008


In message <20080520140054.9565865407 at mcmullan-linux.hq.netapp.com> you wrote:
> On some architectures (MIPS is a good example), the timebase
> rolls over every few seconds. This patch alters the 'sleep'

Well, even if this happens, it should not cause get_timer()  to  show
such problems. get_timer() returns an "unsigned long" and is counting
in milliseconds, so a wrap-around should take about 50 days.

> shell command to use a total counter of the udelay(100)
> sleeps instead of an end time marker to determine the end
> of the sleep, making the 'sleep' command capable of sleeping
> for any number of seconds on all architectures.

I tend to reject this patch because I think we should fix  the  cause
of  the  problems  rather than the symptoms - there are more areas in
the code that rely on sane behaviour of the get_timer() functione.

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 at denx.de
The goal of science is to build better mousetraps. The goal of nature
is to build better mice.




More information about the U-Boot mailing list