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

McMullan, Jason mcmullan at netapp.com
Tue May 20 17:05:50 CEST 2008


On Tue, 2008-05-20 at 16:23 +0200, Wolfgang Denk wrote:
> 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.

Yes, but get_timer() is not guaranteed to return 0 to MAX_ULONG, as
far as I can tell.

On MIPS (even after my CFG_HZ patch), get_timer() will only return
0 to 14316 on a 300MHZ machine, as the 32-bit MIPS tick timer that
forms the MIPS time base wraps to 0 after 14.316 seconds.

> 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.

Well, then we've got a big problem on MIPS.


Jason McMullan
MTS SW
System Firmware

NetApp
724.741.5011    Fax
724.741.5166    Direct
412.656.3519    Mobile
jason.mcmullan at netapp.com
www.netapp.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080520/7a74a3a1/attachment.pgp 


More information about the U-Boot mailing list