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

Wolfgang Denk wd at denx.de
Wed May 25 14:59:03 CEST 2011


Dear Graeme Russ,

In message <4DDCF926.1050904 at gmail.com> you wrote:
> 
> Many platforms have a hardware counter which is incremented without
> assistance from software - not by an ISR, nothing (I mentioned this before,
> but I can't track down the exact email) - THIS is the tick counter returned
> by get_ticks() which the prescaler uses to update the timer when you either:
> 
>  - Explicitly call get_timer()
>  - Call the prescaler from an ISR
> 
> The thing is, I have now highlighted that relying on interrupts to keep
> get_timer() working is a really bad idea - We have no way of stopping
> anyone from calling disable_interrupts() before using the timer

There may be code which doe snot call get_timer() for _long_ times.
And somebody disables interrupts. What's then?

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
Your csh still thinks true is false. Write to your vendor  today  and
tell them that next year Configure ought to "rm /bin/csh" unless they
fix  their blasted shell. :-)
                 - Larry Wall in Configure from the perl distribution


More information about the U-Boot mailing list