
On Mon, May 30, 2011 at 5:24 PM, Graeme Russ graeme.russ@gmail.com wrote:
Hi Reinhard,
On Tue, May 31, 2011 at 4:57 AM, Reinhard Meyer
...
make_timeout() can be arch/soc/platform specific and take into account to return at least such a value that the timeout is never cut short. (In case of a 10 ms NIOS timer, make_timeout(5) would have to return the value 20, resulting in a real timeout of at least 10 ms but upto 20 ms )
What about this:
u32 start = get_timer();
while (!timer_expired(start, timeout)) ...
Hi Graham,
I like this, although I have a small preference for:
u32 stop = time_get_future_ms(1234);
while (!time_reached(stop)) ..
since it possibly means the processing happens up front. However any such function is good and I hope you can add it to your API.
If anyone sees the need, make_timeout (or what ever it might be called) could have a second parameter, indicating whether round up or round down is desired.
...
I also agree to remove the parameter of get_timer(), but we should also get rid of CONFIG_SYS_HZ.
Wholeheartedly agree
SGTM. Things are getting better all the time.
Regards, Simon
Regards,
Graeme _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot