[U-Boot] [RFC] Review of U-Boot timer API

Wolfgang Denk wd at denx.de
Tue May 24 21:09:54 CEST 2011


Dear "J. William Campbell",

In message <4DDBCD69.9090408 at comcast.net> you wrote:
>
>          After really looking into this, I think I agree with Wolfgang 
> that using ms for a get_timer timebase is the best way to go. This 
> thinking is heavily influenced (in my case anyway) by the fact that in 
> the interrupt driven cases (and these are the ONLY fully compliant cases 
> ATM I think), the "cost" of using ms is 0, because that is the "native" 
> unit in which the timer ticks. This makes everything real simple. We 
> can, right today, produce an API that supports u32 get_time_ms(void) for 
> all CPUs in use. This would allow u32 get_timer(u32 base) to continue to 
> exist as-is. These implementations would still be technically "broken" 
> in the non-interrupt case, but they would work at least as well as they 
> presently do. In fact, they would operate better because they would all 
> use a single routine, not a bunch of different routines (some of which I 
> am pretty sure have errors). Wolfgang would need to accept the fact that 
> we are not yet "fixing" all the non-interrupt cases. This needs to be 
> done, but is a different problem (I hope). In the non-interrupt case 

I see this as you do, so this there will be no problems for me to
"accept" this.

Thanks!

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
You know that feeling when you're leaning back  on  a  stool  and  it
starts to tip over? Well, that's how I feel all the time.
- Steven Wright


More information about the U-Boot mailing list